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 Summary
Modifier and TypeMethodDescriptionvoid
Method clean
remove all cache items from the store depends on prefixvoid
Method dropItem
drop a single item, this method is necessary for clean job in case of occurred exceptiongetInputStream
(String prefix, String key) Method getInputStreamlong
getLastModified
(String prefix, String key) Method getLastModifiedgetOutputStream
(String prefix, String key) Method getOutputStreamboolean
Method isCached
-
Method Details
-
clean
Method clean
remove all cache items from the store depends on prefix- Parameters:
prefix
-- Throws:
Exception
-
getOutputStream
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
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
Method dropItem
drop a single item, this method is necessary for clean job in case of occurred exception- Parameters:
prefix
-key
-- Throws:
Exception
-
isCached
Method isCached- Parameters:
prefix
-key
-- Returns:
- true if the item depends on prefix and key available in the store
- Throws:
Exception
-
getLastModified
Method getLastModified- Parameters:
prefix
-key
-- Returns:
- the long value represents the last modified timestamp in milliseconds
- Throws:
Exception
-