org.pm4j.core.pm.impl.cache
Class PmCacheStrategyBase<PM extends PmObject>

java.lang.Object
  extended by org.pm4j.core.pm.impl.cache.PmCacheStrategyBase<PM>
All Implemented Interfaces:
PmCacheStrategy
Direct Known Subclasses:
PmCacheStrategyRequest, PmCacheStrategySession

public abstract class PmCacheStrategyBase<PM extends PmObject>
extends java.lang.Object
implements PmCacheStrategy


Field Summary
 
Fields inherited from interface org.pm4j.core.pm.impl.cache.PmCacheStrategy
NO_CACHE_VALUE, NULL_VALUE_OBJECT
 
Constructor Summary
PmCacheStrategyBase(java.lang.String cacheName)
           
 
Method Summary
 void clear(PmObject pm)
           
protected abstract  void clearImpl(PM pm)
           
 java.lang.Object getCachedValue(PmObject pm)
           
 boolean isCaching()
           
protected  void logPmCacheHit(PmObject pm)
           
protected  void logPmCacheInit(PmObject pm)
           
protected abstract  java.lang.Object readRawValue(PM pm)
           
 java.lang.Object setAndReturnCachedValue(PmObject pm, java.lang.Object v)
           
protected abstract  void writeRawValue(PM pm, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmCacheStrategyBase

public PmCacheStrategyBase(java.lang.String cacheName)
Method Detail

readRawValue

protected abstract java.lang.Object readRawValue(PM pm)

writeRawValue

protected abstract void writeRawValue(PM pm,
                                      java.lang.Object value)

clearImpl

protected abstract void clearImpl(PM pm)

clear

public void clear(PmObject pm)
Specified by:
clear in interface PmCacheStrategy

getCachedValue

public java.lang.Object getCachedValue(PmObject pm)
Specified by:
getCachedValue in interface PmCacheStrategy

setAndReturnCachedValue

public java.lang.Object setAndReturnCachedValue(PmObject pm,
                                                java.lang.Object v)
Specified by:
setAndReturnCachedValue in interface PmCacheStrategy

isCaching

public boolean isCaching()
Specified by:
isCaching in interface PmCacheStrategy

logPmCacheHit

protected void logPmCacheHit(PmObject pm)

logPmCacheInit

protected void logPmCacheInit(PmObject pm)