com.ibm.commons.util
Class SystemCache
java.lang.Object
com.ibm.commons.util.SystemCache
public final class SystemCache
- extends java.lang.Object
System cache using a LRU mechanism.
This cache is used to hold a certain number of entries that can be reused.
For example, it can be used to cache compiled version of JavaScript snippets
of code, or XPath definition.
Constructor Summary |
SystemCache(java.lang.String name,
int maxSize)
|
SystemCache(java.lang.String name,
int maxSize,
java.lang.String propertyName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SystemCache
public SystemCache(java.lang.String name,
int maxSize)
SystemCache
public SystemCache(java.lang.String name,
int maxSize,
java.lang.String propertyName)
getName
public java.lang.String getName()
getAccessedTimes
public long getAccessedTimes()
getInCacheTimes
public long getInCacheTimes()
getAddedTimes
public long getAddedTimes()
getDiscardedTimes
public long getDiscardedTimes()
size
public int size()
getCapacity
public int getCapacity()
clear
public void clear()
remove
public void remove(java.lang.String key)
get
public java.lang.Object get(java.lang.String key)
put
public void put(java.lang.String key,
java.lang.Object value)