|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Store
This is the interface for all stores. A store is a physical counterpart to a cache, which is a logical concept.
| Method Summary | |
|---|---|
boolean |
bufferFull()
Some store types, such as the disk stores can fill their write buffers if puts come in too fast. |
boolean |
containsKey(java.lang.Object key)
A check to see if a key is in the Store. |
void |
dispose()
Prepares for shutdown. |
void |
expireElements()
Expire all elements. |
void |
flush()
Flush elements to persistent store. |
Element |
get(java.lang.Object key)
Gets an item from the cache. |
Policy |
getEvictionPolicy()
|
java.lang.Object[] |
getKeyArray()
Gets an Array of the keys for all elements in the disk store. |
Element |
getQuiet(java.lang.Object key)
Gets an Element from the Store, without updating statistics |
int |
getSize()
Returns the current store size |
long |
getSizeInBytes()
Gets the size of the store, in bytes. |
Status |
getStatus()
Returns the cache status. |
void |
put(Element element)
Puts an item into the store. |
Element |
remove(java.lang.Object key)
Removes an item from the cache. |
void |
removeAll()
Remove all of the elements from the store. |
void |
setEvictionPolicy(Policy policy)
Sets the eviction policy strategy. |
| Method Detail |
|---|
void put(Element element)
throws CacheException
CacheExceptionElement get(java.lang.Object key)
Element getQuiet(java.lang.Object key)
Element from the Store, without updating statistics
java.lang.Object[] getKeyArray()
Serializable keysElement remove(java.lang.Object key)
void removeAll()
throws CacheException
CacheEventListeners they are notified of the expiry or removal
of the Element as each is removed.
CacheExceptionvoid dispose()
int getSize()
long getSizeInBytes()
Status getStatus()
boolean containsKey(java.lang.Object key)
key - The Element key
void expireElements()
void flush()
throws java.io.IOException
java.io.IOException - if any IO error occursboolean bufferFull()
Policy getEvictionPolicy()
setEvictionPolicy(Policy)void setEvictionPolicy(Policy policy)
policy - the new policy
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||