Interface IServerCachePersist

All Known Implementing Classes:
FileCachePersist

public interface IServerCachePersist
This interface describes the methods for the server side cacing store. Please implement this interface in order to provide custom store implementation.
  • Method Details

    • clean

      void clean(String prefix) throws Exception
      Method clean
      remove all cache items from the store depends on prefix
      Parameters:
      prefix -
      Throws:
      Exception
    • getOutputStream

      OutputStream getOutputStream(String prefix, String key) throws Exception
      Method getOutputStream
      Parameters:
      prefix -
      key -
      Returns:
      output stream for creating a new item depends on prefix and key. The OutputStream will be closed by caller
      Throws:
      Exception
    • getInputStream

      InputStream getInputStream(String prefix, String key) throws Exception
      Method getInputStream
      Parameters:
      prefix -
      key -
      Returns:
      input stream for reading item depends on prefix and key. The InputStream will be closed by caller
      Throws:
      Exception
    • dropItem

      void dropItem(String prefix, String key) throws Exception
      Method dropItem
      drop a single item, this method is necessary for clean job in case of occurred exception
      Parameters:
      prefix -
      key -
      Throws:
      Exception
    • isCached

      boolean isCached(String prefix, String key) throws Exception
      Method isCached
      Parameters:
      prefix -
      key -
      Returns:
      true if the item depends on prefix and key available in the store
      Throws:
      Exception
    • getLastModified

      long getLastModified(String prefix, String key) throws Exception
      Method getLastModified
      Parameters:
      prefix -
      key -
      Returns:
      the long value represents the last modified timestamp in milliseconds
      Throws:
      Exception