Methods Summary |
---|
public void | clear()
cache.flushAll();
|
public void | destroy()
cache.destroy();
|
public java.lang.Object | get(java.lang.Object key)
try {
return cache.getFromCache( toString(key), refreshPeriod, cron );
}
catch (NeedsRefreshException e) {
cache.cancelUpdate( toString(key) );
return null;
}
|
public long | getElementCountInMemory()
return -1;
|
public long | getElementCountOnDisk()
return -1;
|
public java.lang.String | getRegionName()
return regionName;
|
public long | getSizeInMemory()
return -1;
|
public int | getTimeout()
return Timestamper.ONE_MS * 60000; //ie. 60 seconds
|
public void | lock(java.lang.Object key)
// local cache, so we use synchronization
|
public long | nextTimestamp()
return Timestamper.next();
|
public void | put(java.lang.Object key, java.lang.Object value)
cache.putInCache( toString(key), value );
|
public java.lang.Object | read(java.lang.Object key)
return get(key);
|
public void | remove(java.lang.Object key)
cache.flushEntry( toString(key) );
|
public void | setCacheCapacity(int cacheCapacity)
cache.setCacheCapacity(cacheCapacity);
|
public java.util.Map | toMap()
throw new UnsupportedOperationException();
|
private java.lang.String | toString(java.lang.Object key)
return String.valueOf(key) + '." + regionName;
|
public java.lang.String | toString()
return "OSCache(" + regionName + ')";
|
public void | unlock(java.lang.Object key)
// local cache, so we use synchronization
|
public void | update(java.lang.Object key, java.lang.Object value)
put(key, value);
|