Class CacheBlock


  • public class CacheBlock
    extends CacheBlockBase
    This class represents the value part stored in the AMCacheManager's cache. Each CacheBlock object would represent a Directory entry. It caches the attributes corresponding to that entry. It also keeps track of red other details such as the Organization DN for the entry.

    Also, this cache block can be used to serve as dummy block representing a non-existent directory entry (negative caching). This prevents making un-necessary directory calls for non-existent directory entries.

    Since the attributes that can be retrieved depends on the principal performing the operation (ACI's set), the result set would vary. The attributes that are returned are the ones that are readable by the principal. Each cache block keeps account of these differences in result sets by storing all the attributes readable (and writable) on a per principal basis. This information is stored in a PrincipalAccess object. In order to avoid duplicate copy of the values, the all attribute values are not cached per principal. A single copy of the attributes is stored in the CacheBlock object. Also this copy of attributes stored in the cache block keeps track of non-existent directory attributes (invalid attributes). This would also prevent un-necessary directory calls for non-existent entry attributes. The attribute copy is dirtied by removing the entries which get modified.