|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.thimbleware.jmemcached.Cache
public class Cache
| Field Summary | |
|---|---|
protected CacheStorage |
cacheStorage
|
int |
currentItems
|
int |
getCmds
|
int |
getHits
|
int |
getMisses
|
int |
setCmds
|
int |
totalItems
|
| Constructor Summary | |
|---|---|
Cache(CacheStorage cacheStorage)
Construct the server session handler |
|
| Method Summary | |
|---|---|
protected boolean |
add(MCElement e)
Add an element to the cache |
boolean |
delete(java.lang.String key,
int time)
Handle the deletion of an item from the cache. |
protected boolean |
flush_all()
Flush all cache entries |
protected boolean |
flush_all(int expire)
Flush all cache entries with a timestamp after a given expiration time |
protected java.lang.Integer |
get_add(java.lang.String key,
int mod)
Increment an (integer) element inthe cache |
protected MCElement |
get(java.lang.String key)
Get an element from the cache |
long |
getCurrentBytes()
|
long |
getCurrentItems()
|
int |
getGetCmds()
|
int |
getGetHits()
|
int |
getGetMisses()
|
long |
getLimitMaxBytes()
|
int |
getSetCmds()
|
int |
getTotalItems()
|
protected void |
initStats()
Initialize all statistic counters |
protected boolean |
is_there(java.lang.String key)
Check whether an element is in the cache and non-expired |
java.util.Set<java.lang.String> |
keys()
|
protected int |
Now()
|
boolean |
replace(MCElement e)
Replace an element in the cache |
protected boolean |
set(MCElement e)
Set an element in the cache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int currentItems
public int totalItems
public int getCmds
public int setCmds
public int getHits
public int getMisses
protected CacheStorage cacheStorage
| Constructor Detail |
|---|
public Cache(CacheStorage cacheStorage)
cacheStorage - the cache to use| Method Detail |
|---|
public boolean delete(java.lang.String key,
int time)
key - the key for the itemtime - only delete the element if time (time in seconds)
protected boolean add(MCElement e)
e - the element to add
public boolean replace(MCElement e)
e - the element to replace
protected boolean set(MCElement e)
e - the element to set
protected java.lang.Integer get_add(java.lang.String key,
int mod)
key - the key to incrementmod - the amount to add to the value
protected boolean is_there(java.lang.String key)
key - the key for the element to lookup
protected MCElement get(java.lang.String key)
key - the key for the element to lookup
protected boolean flush_all()
protected boolean flush_all(int expire)
expire - the flush time in seconds
protected final int Now()
protected void initStats()
public java.util.Set<java.lang.String> keys()
public long getCurrentItems()
public long getLimitMaxBytes()
public long getCurrentBytes()
public int getTotalItems()
public int getGetCmds()
public int getSetCmds()
public int getGetHits()
public int getGetMisses()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||