Interface Cache

All Known Implementing Classes:
FormattingCache, MessageCache, MessageCache2

public interface Cache
  • Method Details

    • get

      CacheItem get(String key)
      get a component's cached data by key
      Parameters:
      key -
      Returns:
      CacheItem object instance that holds the cached data (messages and associated properties)
    • put

      boolean put(String key, CacheItem cacheItem)
      put strings to cache by key
      Parameters:
      key - cache key
      cacheItem - item to be stored in the cache
      Returns:
      false if failed to put
    • remove

      boolean remove(String key)
      remove a component from cache by key
      Parameters:
      key -
      Returns:
      false if failed to remove
    • clear

      boolean clear()
      clear all components in the cache
      Returns:
      false if failed to clear
    • size

      int size()
      get count of current cached components
      Returns:
      count of cached components
    • keySet

      Set<String> keySet()
      get the set of cached keys
      Returns:
      set of cached keys
    • getExpiredTime

      long getExpiredTime()
      get expired time
      Returns:
      long time
    • setExpiredTime

      void setExpiredTime(long millis)
      set expired time
      Parameters:
      millis -
    • getLastClean

      long getLastClean()
      get time of last clean
      Returns:
      long time
    • setLastClean

      void setLastClean(long millis)
      set time of last clean
      Parameters:
      millis -
    • setXCapacity

      void setXCapacity(int capacityX)
      set the cache's capacity by specifying the count of components
      Parameters:
      capacityX -
    • getXCapacity

      int getXCapacity()
      get the cache capacity
      Returns:
      cache capacity
    • isExpired

      boolean isExpired()
      Deprecated.
      Use the isExpired method.
    • getDropId

      String getDropId()
      get a id of translation drop
      Returns:
      a drop id