org.apache.synapse.mediators.builtin
Class CacheMediator
java.lang.Object
org.apache.synapse.mediators.AbstractMediator
org.apache.synapse.mediators.builtin.CacheMediator
- All Implemented Interfaces:
- Mediator
public class CacheMediator
- extends AbstractMediator
CacheMediator will cache the response messages indexed using the hash value of the
request message, and subsequent messages with the same request (request hash will be
generated and checked for the equality) within the cache expiration period will be served
from the stored responses in the cache
- See Also:
Mediator
| Methods inherited from class org.apache.synapse.mediators.AbstractMediator |
auditLog, auditWarn, getTraceState, getType, handleException, handleException, isTraceOn, isTraceOrDebugOn, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheMediator
public CacheMediator()
mediate
public boolean mediate(MessageContext synCtx)
- Description copied from interface:
Mediator
- Invokes the mediator passing the current message for mediation. Each
mediator performs its mediation action, and returns true if mediation
should continue, or false if further mediation should be aborted.
- Parameters:
synCtx - the current message for mediation
- Returns:
- true if further mediation should continue
getId
public String getId()
setId
public void setId(String id)
getScope
public String getScope()
setScope
public void setScope(String scope)
isCollector
public boolean isCollector()
setCollector
public void setCollector(boolean collector)
getDigestGenerator
public org.wso2.caching.digest.DigestGenerator getDigestGenerator()
setDigestGenerator
public void setDigestGenerator(org.wso2.caching.digest.DigestGenerator digestGenerator)
getInMemoryCacheSize
public int getInMemoryCacheSize()
setInMemoryCacheSize
public void setInMemoryCacheSize(int inMemoryCacheSize)
getDiskCacheSize
public int getDiskCacheSize()
setDiskCacheSize
public void setDiskCacheSize(int diskCacheSize)
getTimeout
public long getTimeout()
setTimeout
public void setTimeout(long timeout)
getOnCacheHitSequence
public SequenceMediator getOnCacheHitSequence()
setOnCacheHitSequence
public void setOnCacheHitSequence(SequenceMediator onCacheHitSequence)
getOnCacheHitRef
public String getOnCacheHitRef()
setOnCacheHitRef
public void setOnCacheHitRef(String onCacheHitRef)
getMaxMessageSize
public int getMaxMessageSize()
setMaxMessageSize
public void setMaxMessageSize(int maxMessageSize)
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.