public abstract class CacheBlockBase extends Object
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.
Constructor and Description |
---|
CacheBlockBase(String entryDN,
boolean validEntry) |
CacheBlockBase(String entryDN,
String orgDN,
boolean validEntry) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Should be cleared, only if the entry is still valid only the data has
changed.
|
Map |
getAttributes(boolean byteValues) |
Map |
getAttributes(Set attrNames,
boolean byteValues) |
abstract Debug |
getDebug() |
abstract long |
getDefaultEntryExpirationTime() |
String |
getEntryDN() |
int |
getObjectType() |
String |
getOrganizationDN() |
abstract long |
getUserEntryExpirationTime() |
boolean |
hasCache() |
boolean |
hasCompleteSet() |
boolean |
hasExpiredAndUpdated()
If cache expiry has been enabled then this will return true if the cache has expired.
|
abstract boolean |
isEntryExpirationEnabled() |
boolean |
isExists()
Method which specifies if the entry exists in the directory or is an
invalid entry.
|
void |
putAttributes(Map attributes,
Set inAccessibleAttrNames,
boolean isCompleteSet,
boolean byteValues) |
void |
removeAttributes() |
void |
removeAttributes(Set attrNames) |
void |
replaceAttributes(String principalDN,
Map sAttributes,
Map bAttributes) |
void |
setExists(boolean exists) |
void |
setObjectType(int type) |
void |
setOrganizationDN(String orgDN) |
String |
toString() |
public CacheBlockBase(String entryDN, boolean validEntry)
public abstract boolean isEntryExpirationEnabled()
public abstract long getUserEntryExpirationTime()
public abstract long getDefaultEntryExpirationTime()
public abstract Debug getDebug()
public void setExists(boolean exists)
public void setObjectType(int type)
public void setOrganizationDN(String orgDN)
public String getOrganizationDN()
public int getObjectType()
public String getEntryDN()
public boolean isExists()
public boolean hasExpiredAndUpdated()
If cache expiry has been enabled then this will return true if the cache has expired.
Note: This call must be made outside of a readLock because if the cache has expired then a writeLock is required as part of callingclear()
which would result in a deadlock, a readLock
cannot be upgraded to a writeLock.public boolean hasCache()
public boolean hasCompleteSet()
public Map getAttributes(boolean byteValues)
public void putAttributes(Map attributes, Set inAccessibleAttrNames, boolean isCompleteSet, boolean byteValues)
public void removeAttributes()
public void removeAttributes(Set attrNames)
public void replaceAttributes(String principalDN, Map sAttributes, Map bAttributes)
public void clear()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.