Class DsdCacheEntry
- java.lang.Object
-
- org.apache.directory.fortress.core.util.cache.DsdCacheEntry
-
public class DsdCacheEntry extends Object
Value object wrapsSDSet
for caching purposes. This class also provides attributes that are used for searching the DSD cache.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description DsdCacheEntry(String member, SDSet sdSet, boolean empty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContextId()
Set the contextId for this record.String
getMember()
Return the Role name this cache entry corresponds with.String
getName()
Return the name that is used as the cache name for this entry.SDSet
getSdSet()
Get the DSD for this cache entry.boolean
isEmpty()
To prevent repeated reads of the DSD's in the directory, Entries are added to the cache and marked empty.void
setEmpty(boolean empty)
To prevent repeated reads of the DSD's in the directory, Entries are added to the cache and marked empty.void
setMember(String member)
Set the Role name this cache entry corresponds with.void
setName(String name)
Set the name to be used for this cache entry.void
setSdSet(SDSet sdSet)
Set the DSD for this cache entry.
-
-
-
Constructor Detail
-
DsdCacheEntry
public DsdCacheEntry(String member, SDSet sdSet, boolean empty)
Non-default contructor takes amember
that maps toRole.name
, along with a reference toSDSet
and a boolean value to indicate if DSD not found for member, which indicates empty.- Parameters:
member
- maps toRole.name
sdSet
- contains DSD entry.empty
- if true, the DSD entry was not found for a corresponding Role.
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
To prevent repeated reads of the DSD's in the directory, Entries are added to the cache and marked empty.- Returns:
- boolean if cache entry is 'empty'.
-
setEmpty
public void setEmpty(boolean empty)
To prevent repeated reads of the DSD's in the directory, Entries are added to the cache and marked empty.- Parameters:
empty
- if the cache entry is 'empty'.
-
getMember
public String getMember()
Return the Role name this cache entry corresponds with.- Returns:
- Role name.
-
setMember
public void setMember(String member)
Set the Role name this cache entry corresponds with.- Parameters:
member
- Role name
-
getSdSet
public SDSet getSdSet()
Get the DSD for this cache entry.- Returns:
- SDSet of type
SDSet.SDType.DYNAMIC
.
-
setSdSet
public void setSdSet(SDSet sdSet)
Set the DSD for this cache entry.- Parameters:
sdSet
- reference to non-nullSDSet
of typeSDSet.SDType.DYNAMIC
.
-
getName
public String getName()
Return the name that is used as the cache name for this entry.- Returns:
- name for the Cache entry.
-
setName
public void setName(String name)
Set the name to be used for this cache entry.- Parameters:
name
- of the cache entry.
-
getContextId
public String getContextId()
Set the contextId for this record. The contextId is used for multi-tenancy to isolate data sets within a particular sub-tree within DIT- Returns:
- value maps to sub-tree in DIT, e.g. ou=contextId, dc=example, dc=com.
-
-