Class DsdCacheEntry


  • public class DsdCacheEntry
    extends Object
    Value object wraps SDSet for caching purposes. This class also provides attributes that are used for searching the DSD cache.
    Author:
    Apache Directory Project
    • Constructor Detail

      • DsdCacheEntry

        public DsdCacheEntry​(String member,
                             SDSet sdSet,
                             boolean empty)
        Non-default contructor takes a member that maps to Role.name, along with a reference to SDSet and a boolean value to indicate if DSD not found for member, which indicates empty.
        Parameters:
        member - maps to Role.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
      • setSdSet

        public void setSdSet​(SDSet sdSet)
        Set the DSD for this cache entry.
        Parameters:
        sdSet - reference to non-null SDSet of type SDSet.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.