Methods Summary |
---|
public boolean | afterInsert(java.lang.Object key, java.lang.Object value, java.lang.Object version)Do nothing.
return false;
|
public boolean | afterUpdate(java.lang.Object key, java.lang.Object value, java.lang.Object version, SoftLock clientLock)Do nothing.
return false;
|
public void | clear()
log.debug( "clearing" );
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)
cache.remove( key );
|
public java.lang.Object | get(java.lang.Object key, long txTimestamp)
if ( log.isDebugEnabled() ) {
log.debug( "cache lookup: " + key );
}
Object result = cache.read( key );
if ( log.isDebugEnabled() ) {
log.debug( result == null ? "cache miss" : "cache hit" );
}
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)
if ( log.isDebugEnabled() ) {
log.debug( "inserting: " + key );
}
if ( cache instanceof OptimisticCache ) {
( ( OptimisticCache ) cache ).writeInsert( key, value, currentVersion );
}
else {
cache.update( key, value );
}
return true;
|
public SoftLock | lock(java.lang.Object key, java.lang.Object version)Do nothing, returning null.
//noop
return null;
|
public boolean | put(java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version, java.util.Comparator versionComparator, boolean minimalPut)
if ( minimalPut && cache.read( key ) != null ) {
if ( log.isDebugEnabled() ) {
log.debug( "item already cached: " + key );
}
return false;
}
if ( log.isDebugEnabled() ) {
log.debug( "caching: " + key );
}
if ( cache instanceof OptimisticCache ) {
( ( OptimisticCache ) cache ).writeLoad( key, value, version );
}
else {
cache.put( key, value );
}
return true;
|
public void | release(java.lang.Object key, SoftLock clientLock)Do nothing.
//noop
|
public void | remove(java.lang.Object key)
if ( log.isDebugEnabled() ) {
log.debug( "removing: " + key );
}
cache.remove( key );
|
public void | setCache(Cache cache)
this.cache = cache;
|
public java.lang.String | toString()
return cache + "(transactional)";
|
public boolean | update(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion)
if ( log.isDebugEnabled() ) {
log.debug( "updating: " + key );
}
if ( cache instanceof OptimisticCache ) {
( ( OptimisticCache ) cache ).writeUpdate( key, value, currentVersion, previousVersion );
}
else {
cache.update( key, value );
}
return true;
|