|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache<CACHE_ELEMENT extends CacheElement>
| Nested Class Summary | |
|---|---|
static class |
Cache.DeleteResponse
Enum defining responses statuses from removal commands |
static class |
Cache.StoreResponse
Enum defining response statuses from set/add type commands |
| Method Summary | |
|---|---|
Cache.StoreResponse |
add(CACHE_ELEMENT e)
Add an element to the cache |
Cache.StoreResponse |
append(CACHE_ELEMENT element)
Append bytes to the end of an element in the cache |
void |
asyncEventPing()
Called periodically by the network event loop to process any pending events. |
Cache.StoreResponse |
cas(java.lang.Long cas_key,
CACHE_ELEMENT e)
Set an element in the cache but only if the element has not been touched since the last 'gets' |
void |
close()
Close the cache, freeing all resources on which it depends. |
Cache.DeleteResponse |
delete(Key key,
int time)
Handle the deletion of an item from the cache. |
boolean |
flush_all()
Flush all cache entries |
boolean |
flush_all(int expire)
Flush all cache entries with a timestamp after a given expiration time |
java.lang.Integer |
get_add(Key key,
int mod)
Increment/decremen t an (integer) element in the cache |
CACHE_ELEMENT[] |
get(Key... keys)
Get element(s) from the cache |
long |
getCurrentBytes()
|
long |
getCurrentItems()
|
int |
getGetCmds()
|
int |
getGetHits()
|
int |
getGetMisses()
|
long |
getLimitMaxBytes()
|
int |
getSetCmds()
|
Cache.StoreResponse |
prepend(CACHE_ELEMENT element)
Prepend bytes to the end of an element in the cache |
Cache.StoreResponse |
replace(CACHE_ELEMENT e)
Replace an element in the cache |
Cache.StoreResponse |
set(CACHE_ELEMENT e)
Set an element in the cache |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
stat(java.lang.String arg)
Retrieve stats about the cache. |
| Method Detail |
|---|
Cache.DeleteResponse delete(Key key,
int time)
key - the key for the itemtime - an amount of time to block this entry in the cache for further writes
Cache.StoreResponse add(CACHE_ELEMENT e)
e - the element to add
Cache.StoreResponse replace(CACHE_ELEMENT e)
e - the element to replace
Cache.StoreResponse append(CACHE_ELEMENT element)
element - the element to append
Cache.StoreResponse prepend(CACHE_ELEMENT element)
element - the element to append
Cache.StoreResponse set(CACHE_ELEMENT e)
e - the element to set
Cache.StoreResponse cas(java.lang.Long cas_key,
CACHE_ELEMENT e)
cas_key - the cas key returned by the last getse - the element to set
java.lang.Integer get_add(Key key,
int mod)
key - the key to incrementmod - the amount to add to the value
CACHE_ELEMENT[] get(Key... keys)
keys - the key for the element to lookup
boolean flush_all()
boolean flush_all(int expire)
expire - the flush time in seconds
void close()
throws java.io.IOException
java.io.IOExceptionlong getCurrentItems()
long getLimitMaxBytes()
long getCurrentBytes()
int getGetCmds()
int getSetCmds()
int getGetHits()
int getGetMisses()
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> stat(java.lang.String arg)
arg - a specific extended stat sub-category
void asyncEventPing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||