|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- type of keys used to identify cache itemsV
- type of values stored in the cachepublic interface SimpleCache<K extends java.io.Serializable,V extends java.io.Serializable>
Generic interface for simple distributed cache. Items placed into this cache will be distributed amount other instances of cache. NOTE this is specific case of using cache - items are not removed from cache individually.
Method Summary | |
---|---|
void |
clear()
Clears cache content |
java.util.Set<K> |
getKeys()
Returns set of keys for items stored in cache |
V |
getObject(K aKey)
Returns object from cache for given key |
java.util.Set<V> |
getValues()
Returns items stored in the cache |
void |
saveObject(K aKey,
V aValue)
Stores object in cache |
int |
size()
Returns amount of items stored in cache |
void |
update(java.util.Map<K,V> aData)
Updates content of cache by given values (old values will be removed) |
Method Detail |
---|
void saveObject(K aKey, V aValue)
aKey
- key of objectaValue
- item valueV getObject(K aKey)
aKey
- key of the object
null
if there is
no item in the cache for given keyvoid clear()
void update(java.util.Map<K,V> aData)
aData
- new content of the cachejava.util.Set<V> getValues()
int size()
java.util.Set<K> getKeys()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |