Class CacheBlock
- java.lang.Object
-
- com.iplanet.am.sdk.common.CacheBlockBase
-
- com.iplanet.am.sdk.common.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected static longENTRY_DEFAULT_EXPIRE_TIMEprotected static StringENTRY_DEFAULT_EXPIRE_TIME_KEYprotected static booleanENTRY_EXPIRATION_ENABLED_FLAGprotected static StringENTRY_EXPIRATION_ENABLED_KEYprotected static longENTRY_USER_EXPIRE_TIMEprotected static StringENTRY_USER_EXPIRE_TIME_KEY
-
Constructor Summary
Constructors Constructor Description CacheBlock(String entryDN, boolean validEntry)CacheBlock(String entryDN, String orgDN, boolean validEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DebuggetDebug()longgetDefaultEntryExpirationTime()longgetUserEntryExpirationTime()booleanisEntryExpirationEnabled()-
Methods inherited from class com.iplanet.am.sdk.common.CacheBlockBase
clear, getAttributes, getAttributes, getEntryDN, getObjectType, getOrganizationDN, hasCache, hasCompleteSet, hasExpiredAndUpdated, isExists, putAttributes, removeAttributes, removeAttributes, replaceAttributes, setExists, setObjectType, setOrganizationDN, toString
-
-
-
-
Field Detail
-
ENTRY_EXPIRATION_ENABLED_KEY
protected static final String ENTRY_EXPIRATION_ENABLED_KEY
- See Also:
- Constant Field Values
-
ENTRY_USER_EXPIRE_TIME_KEY
protected static final String ENTRY_USER_EXPIRE_TIME_KEY
- See Also:
- Constant Field Values
-
ENTRY_DEFAULT_EXPIRE_TIME_KEY
protected static final String ENTRY_DEFAULT_EXPIRE_TIME_KEY
- See Also:
- Constant Field Values
-
ENTRY_EXPIRATION_ENABLED_FLAG
protected static boolean ENTRY_EXPIRATION_ENABLED_FLAG
-
ENTRY_USER_EXPIRE_TIME
protected static long ENTRY_USER_EXPIRE_TIME
-
ENTRY_DEFAULT_EXPIRE_TIME
protected static long ENTRY_DEFAULT_EXPIRE_TIME
-
-
Method Detail
-
isEntryExpirationEnabled
public boolean isEntryExpirationEnabled()
- Specified by:
isEntryExpirationEnabledin classCacheBlockBase
-
getUserEntryExpirationTime
public long getUserEntryExpirationTime()
- Specified by:
getUserEntryExpirationTimein classCacheBlockBase
-
getDefaultEntryExpirationTime
public long getDefaultEntryExpirationTime()
- Specified by:
getDefaultEntryExpirationTimein classCacheBlockBase
-
getDebug
public Debug getDebug()
- Specified by:
getDebugin classCacheBlockBase
-
-