Class EhCacheImpl

    • Method Detail

      • get

        public Object get​(Object key)
                   throws org.apache.directory.fortress.core.util.cache.CacheException
        Given a key name, return the corresponding value.
        Specified by:
        get in interface Cache
        Parameters:
        key - is the name used to store the entry.
        Returns:
        entry stored in the cache.
        Throws:
        org.apache.directory.fortress.core.util.cache.CacheException - in the event ehcache throws an exception it will be wrapped.
      • put

        public void put​(Object key,
                        Object value)
                 throws org.apache.directory.fortress.core.util.cache.CacheException
        Add a new entry to the cache.
        Specified by:
        put in interface Cache
        Parameters:
        key - name to be used for the entry.
        value - object that is stored.
        Throws:
        org.apache.directory.fortress.core.util.cache.CacheException - in the event ehcache throws an exception it will be wrapped.
      • clear

        public boolean clear​(Object key)
                      throws org.apache.directory.fortress.core.util.cache.CacheException
        Clear a cache entry for a given name.
        Specified by:
        clear in interface Cache
        Parameters:
        key - name that entry is stored as.
        Returns:
        boolean value will be false if entry not found and true if entry was found and removed.
        Throws:
        org.apache.directory.fortress.core.util.cache.CacheException - in the event ehcache throws an exception it will be wrapped.
      • flush

        public void flush()
                   throws org.apache.directory.fortress.core.util.cache.CacheException
        Remove all entries from this cache.
        Specified by:
        flush in interface Cache
        Throws:
        org.apache.directory.fortress.core.util.cache.CacheException - in the event ehcache throws an exception it will be wrapped.
      • getSearchAttribute

        public <T> net.sf.ehcache.search.Attribute<T> getSearchAttribute​(String attributeName)
                                                                  throws org.apache.directory.fortress.core.util.cache.CacheException
        Retrieve the Cache attribute
        Specified by:
        getSearchAttribute in interface Cache
        Type Parameters:
        T - the type of search attribute
        Parameters:
        attributeName - the name of search attribute
        Returns:
        the search attribute
        Throws:
        org.apache.directory.fortress.core.util.cache.CacheException - in the event ehcache throws an exception it will be wrapped.
      • createQuery

        public net.sf.ehcache.search.Query createQuery()
        Create a search query builder for the cache.
        Specified by:
        createQuery in interface Cache
        Returns:
        a new Query builder
      • clear

        public void clear()