Methods Summary |
---|
public boolean | afterInsert(java.lang.Object key, java.lang.Object value, java.lang.Object version)Do nothing.
if ( log.isDebugEnabled() ) log.debug("Caching after insert: " + key);
cache.update(key, value);
return true;
|
public boolean | afterUpdate(java.lang.Object key, java.lang.Object value, java.lang.Object version, SoftLock lock)Unsupported!
log.error("Application attempted to edit read only item: " + key);
throw new UnsupportedOperationException("Can't write to a readonly object");
|
public void | clear()
cache.clear();
|
public void | destroy()
try {
cache.destroy();
}
catch (Exception e) {
log.warn("could not destroy cache", e);
}
|
public void | evict(java.lang.Object key)Do nothing.
// noop
|
public synchronized java.lang.Object | get(java.lang.Object key, long timestamp)
Object result = cache.get(key);
if ( result!=null && log.isDebugEnabled() ) log.debug("Cache hit: " + key);
return result;
|
public Cache | getCache()
return cache;
|
public java.lang.String | getRegionName()
return cache.getRegionName();
|
public boolean | insert(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion)Do nothing.
return false;
|
public SoftLock | lock(java.lang.Object key, java.lang.Object version)Unsupported!
log.error("Application attempted to edit read only item: " + key);
throw new UnsupportedOperationException("Can't write to a readonly object");
|
public synchronized boolean | put(java.lang.Object key, java.lang.Object value, long timestamp, java.lang.Object version, java.util.Comparator versionComparator, boolean minimalPut)
if ( minimalPut && cache.get(key)!=null ) {
if ( log.isDebugEnabled() ) log.debug("item already cached: " + key);
return false;
}
if ( log.isDebugEnabled() ) log.debug("Caching: " + key);
cache.put(key, value);
return true;
|
public void | release(java.lang.Object key, SoftLock lock)Unsupported!
log.error("Application attempted to edit read only item: " + key);
//throw new UnsupportedOperationException("Can't write to a readonly object");
|
public void | remove(java.lang.Object key)
cache.remove(key);
|
public void | setCache(Cache cache)
this.cache=cache;
|
public java.lang.String | toString()
return cache + "(read-only)";
|
public boolean | update(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion)Unsupported!
log.error("Application attempted to edit read only item: " + key);
throw new UnsupportedOperationException("Can't write to a readonly object");
|