public interface DiskCache<K,V> extends SubCache<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Cleans the cache, by removing all cache entries
|
CacheEntry<V> |
get(K key,
Class<?> targetClass,
int collectionType) |
boolean |
isForMimeType(String mimeType)
Determines if the the cache implementation can store values of the given mime type
|
void |
put(K key,
V value,
String mimeType,
String charsetEncoding,
long expirationTimeStamp,
String eTag)
Adds and create a new
CacheEntry to the cache. |
void |
putRaw(K key,
byte[] bytes,
String mimeType,
String charsetEncoding,
long expirationTimeStamp,
String eTag)
Put as raw bytes
|
void |
setParserWriterPool(ParserWriterPool pool)
Used to give the disk cache all available
ParserWriters
to read or write data |
remove, updateExpirationTimestampvoid setParserWriterPool(ParserWriterPool pool)
ParserWriters
to read or write datapool - CacheEntry<V> get(K key, Class<?> targetClass, int collectionType) throws Exception
Exceptionvoid clear()
throws IOException
IOExceptionvoid put(K key, V value, String mimeType, String charsetEncoding, long expirationTimeStamp, String eTag) throws Exception
CacheEntry to the cache.key - The keyvalue - The Value for the given keymimeType - The mime type of the value. This is important to find the
correct parser for the stored cache valuecharsetEncoding - The charset like, UTF-8 etc. that i used, to encode the
string content (is useless for binary data)expirationTimeStamp - The expiration valueeTag - The ETagExceptionvoid putRaw(K key, byte[] bytes, String mimeType, String charsetEncoding, long expirationTimeStamp, String eTag) throws Exception
key - bytes - mimeType - charsetEncoding - expirationTimeStamp - eTag - Exceptionboolean isForMimeType(String mimeType)
mimeType - Copyright © 2015 Hannes Dorfmann. All rights reserved.