|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jpattern.gwt.client.cache.PermanentCache
public class PermanentCache
A Cache that holds forever the objects put in it
| Constructor Summary | |
|---|---|
PermanentCache()
|
|
| Method Summary | ||
|---|---|---|
int |
cacheSize()
return the total number of objects hold by the cache |
|
Object |
get(String key)
Return the object associated to the key if exists, null otherwise |
|
|
get(String key,
Class<T> clazz)
Return the object associated to the key if exists, null otherwise |
|
int |
getHits()
return the total number of times an object has not be found in the cache |
|
int |
getMissing()
return the total number of times an object has not be found in the cache |
|
int |
getTotalcalls()
return the total number of request to get an object from the cache |
|
void |
put(String key,
Object value)
Put a new object in the cache |
|
void |
remove(String key)
Remove an object from the cache |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PermanentCache()
| Method Detail |
|---|
public void put(String key,
Object value)
ICache
put in interface ICachepublic Object get(String key)
ICache
get in interface ICache
public <T> T get(String key,
Class<T> clazz)
ICache
get in interface ICachepublic void remove(String key)
ICache
remove in interface ICachepublic int cacheSize()
ICache
cacheSize in interface ICachepublic int getMissing()
ICache
getMissing in interface ICachepublic int getHits()
ICache
getHits in interface ICachepublic int getTotalcalls()
ICache
getTotalcalls in interface ICache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||