|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CacheImplementationInterface<K,V>
Classes which can be used as a cache implementation need to implement this interface. An implementation of this interface has to be thread-safe to guarantee correctness.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Method Summary | |
|---|---|
void |
config(Map<String,String> configuration)
Configure the implementation with the given configuration values |
int |
getCount(K key)
Returns the hit-count on a certain key (if implementable, -1 otherwise). |
Object |
getLock()
The cache implementation must be somehow thread-safe. |
int |
maxSize()
Gets the (maximal) size of the cache (if implementable) |
void |
setMaxSize(int size)
Sets the (maximal) size of the cache (if implementable). |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Method Detail |
|---|
void setMaxSize(int size)
int maxSize()
int getCount(K key)
void config(Map<String,String> configuration)
Object getLock()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||