org.pm4j.core.pm.impl
Class PmCacheApiHandler

java.lang.Object
  extended by org.pm4j.core.pm.impl.PmCacheApiHandler

public class PmCacheApiHandler
extends java.lang.Object


Constructor Summary
PmCacheApiHandler()
           
 
Method Summary
 void clearCachedPmValues(PmObject pm, PmCacheApi.CacheKind... cacheKinds)
          Clears cached content (if there was something cached).
Causes a reload of the content with the next request.
 void clearCachedPmValues(PmObject pm, java.util.Set<PmCacheApi.CacheKind> cacheSet)
          An alternate signature for #clearCachedPmValues(org.pm4j.core.pm.PmObject.CacheKind...) that is a little more efficient, since it can quickly check the set if a specific cache kind is to clear.
 void clearCachedPmValuesInCtxtPath(PmObject pm, boolean includeSession, PmCacheApi.CacheKind... cacheKinds)
          Calls #clearCachedPmValues() on all PMs in the pmParent hierarchy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmCacheApiHandler

public PmCacheApiHandler()
Method Detail

clearCachedPmValues

public void clearCachedPmValues(PmObject pm,
                                PmCacheApi.CacheKind... cacheKinds)
Clears cached content (if there was something cached).
Causes a reload of the content with the next request.

Parameters:
cacheKinds - The set of caches to be cleared. If no cacheKind is specified, all cache kinds will be cleared.

clearCachedPmValues

public void clearCachedPmValues(PmObject pm,
                                java.util.Set<PmCacheApi.CacheKind> cacheSet)
An alternate signature for #clearCachedPmValues(org.pm4j.core.pm.PmObject.CacheKind...) that is a little more efficient, since it can quickly check the set if a specific cache kind is to clear.

Subclasses that need to extend the clear implementation should override this method.

Parameters:
cacheSet - Specification of the cache kinds to clear.

clearCachedPmValuesInCtxtPath

public void clearCachedPmValuesInCtxtPath(PmObject pm,
                                          boolean includeSession,
                                          PmCacheApi.CacheKind... cacheKinds)
Calls #clearCachedPmValues() on all PMs in the pmParent hierarchy.

Parameters:
includeSession - true causes a clear within the complete context path, including the PmConversation instance(s) within the path.
false causes a clear on all context items exclusive the containing session (and its contexts).
cacheKinds - The set of caches to be cleared. If no cacheKind is specified, all cache kinds will be cleared.