info.magnolia.module.cache
Class CachePolicyResult

java.lang.Object
  extended by info.magnolia.module.cache.CachePolicyResult

public class CachePolicyResult
extends Object

CachePolicy returns instances of this class - depending on the value of the behaviour property, the cacheKey and cachedEntry values might be set or not.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Nested Class Summary
static class CachePolicyResult.CachePolicyBehaviour
          Descriptor of the cache policy behavior used by this cache policy result.
 
Field Summary
static CachePolicyResult.CachePolicyBehaviour bypass
           
static CachePolicyResult.CachePolicyBehaviour store
           
static CachePolicyResult.CachePolicyBehaviour useCache
           
 
Constructor Summary
CachePolicyResult(CachePolicyResult.CachePolicyBehaviour behaviour, Object cacheKey, Object cachedEntry)
           
 
Method Summary
 CachePolicyResult.CachePolicyBehaviour getBehaviour()
           
 Object getCachedEntry()
           
 Object getCacheKey()
           
static CachePolicyResult getCurrent()
          Returns the current CachePolicyResult which was set by the CacheFilter.
 void setCachedEntry(Object entry)
           
static void setCurrent(CachePolicyResult cachePolicyResult)
          Saves the result in the context and makes it available by getCurrent().
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

store

public static final CachePolicyResult.CachePolicyBehaviour store

useCache

public static final CachePolicyResult.CachePolicyBehaviour useCache

bypass

public static final CachePolicyResult.CachePolicyBehaviour bypass
Constructor Detail

CachePolicyResult

public CachePolicyResult(CachePolicyResult.CachePolicyBehaviour behaviour,
                         Object cacheKey,
                         Object cachedEntry)
Method Detail

getBehaviour

public CachePolicyResult.CachePolicyBehaviour getBehaviour()

getCacheKey

public Object getCacheKey()

getCachedEntry

public Object getCachedEntry()

toString

public String toString()
Overrides:
toString in class Object

setCachedEntry

public void setCachedEntry(Object entry)

setCurrent

public static void setCurrent(CachePolicyResult cachePolicyResult)
Saves the result in the context and makes it available by getCurrent().


getCurrent

public static CachePolicyResult getCurrent()
Returns the current CachePolicyResult which was set by the CacheFilter.



Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.