Interface ISCCacheModule<T>

All Known Implementing Classes:
EHCacheImpl

public interface ISCCacheModule<T>
The Interface ISCCacheModule. Abstracts SC caches modules. A SCCache holds cache modules. A cache module is a logical part of a cache.
  • Method Details

    • get

      T get(Object key)
      Gets the object from cache module.
      Parameters:
      key - the key
      Returns:
      the object
    • putOrUpdate

      void putOrUpdate(Object key, T value, int timeToLiveSeconds)
      Put the object in cache module. Existing elements are replaced.
      Parameters:
      key - the key
      value - the value to store
      timeToLiveSeconds - seconds the object has to stay in cache module from now on
    • replace

      void replace(Object key, T value, int timeToLiveSeconds)
      Replace the object in cache module. Element has to be in place otherwise replace fails.
      Parameters:
      key - the key
      value - the value to store
      timeToLiveSeconds - seconds the object has to stay in cache module from now on
    • getKeyList

      List<String> getKeyList()
      Gets the list of keys in the cache module.
      Returns:
      the keys with expire check
    • getExpirationTime

      Date getExpirationTime(String key)
      Gets the expiration time.
      Parameters:
      key - the key
      Returns:
      the expiration time
    • getCreationTime

      Date getCreationTime(String key)
      Gets the creation time.
      Parameters:
      key - the key
      Returns:
      the creation time
    • getLastAccessTime

      Date getLastAccessTime(String key)
      Gets the last access time.
      Parameters:
      key - the key
      Returns:
      the last access time
    • getCacheModuleName

      String getCacheModuleName()
      Gets the cache name.
      Returns:
      the cache name
    • getNumberOfMessagesInStore

      long getNumberOfMessagesInStore()
      Gets the memory store size.
      Returns:
      the memory store size
    • getNumberOfMessagesInDiskStore

      long getNumberOfMessagesInDiskStore()
      Gets the disk store size.
      Returns:
      the disk store size
    • getOffHeapSize

      long getOffHeapSize()
      Gets the off heap size.
      Returns:
      the off heap size
    • getInMemorySize

      long getInMemorySize()
      Gets the in memory size.
      Returns:
      the in memory size
    • remove

      T remove(Object key)
      Removes the object from cache module.
      Parameters:
      key - the key
      Returns:
      true, if successful
    • removeAll

      void removeAll()
      Removes all the objects from cache module.
    • destroy

      void destroy()
      Destroys the cache module.