org.jboss.cache.interceptors
Class PassivationInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.MethodDispacherInterceptor
org.jboss.cache.interceptors.PassivationInterceptor
- All Implemented Interfaces:
- InterceptorMBean, PassivationInterceptorMBean
public class PassivationInterceptor
- extends MethodDispacherInterceptor
- implements PassivationInterceptorMBean
Writes evicted nodes back to the store on the way in through the
CacheLoader, either before each method call (no TXs), or at TX commit.
- Version:
- $Id: PassivationInterceptor.java 4986 2008-01-04 16:55:01Z manik.surtani@jboss.com $
- Author:
- {Hany Mesha}
Methods inherited from class org.jboss.cache.interceptors.MethodDispacherInterceptor |
handleAddChildMethod, handleBlockChannelMethod, handleCommitMethod, handleDataGravitationCleanupMethod, handleEvictVersionedNodeMethod, handleExistsMethod, handleGetDataMapMethod, handleGetChildrenNamesMethod, handleGetKeysMethod, handleGetKeyValueMethod, handleGetNodeMethod, handleLockMethod, handleMoveMethod, handleOptimisticPrepareMethod, handlePrepareMethod, handlePrintMethod, handlePutDataEraseMethod, handlePutDataEraseVersionedMethod, handlePutDataMethod, handlePutDataVersionedMethod, handlePutForExternalReadMethod, handlePutForExternalReadVersionedMethod, handlePutKeyValueMethod, handlePutKeyValueVersionedMethod, handleReleaseAllLocksMethod, handleRemoveDataMethod, handleRemoveDataVersionedMethod, handleRemoveKeyMethod, handleRemoveKeyVersionedMethod, handleRemoveNodeMethod, handleRemoveNodeVersionedMethod, handleRollbackMethod, handleUnblockChannelMethod, invoke, skipMethodCall |
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
assertTransactionValid, getLast, getNext, getStatisticsEnabled, initLogger, isActive, isPreparing, isValid, nextInterceptor, peekNode, setLast, setNext, setStatisticsEnabled, toString |
loader
protected CacheLoader loader
PassivationInterceptor
public PassivationInterceptor()
setCache
public void setCache(CacheSPI cache)
- Overrides:
setCache
in class Interceptor
handleEvictMethod
protected Object handleEvictMethod(InvocationContext ctx,
Fqn fqn)
throws Throwable
- Notifies the cache instance listeners that the evicted node is about to
be passivated and stores the evicted node and its attributes back to the
store using the CacheLoader.
- Overrides:
handleEvictMethod
in class MethodDispacherInterceptor
- Throws:
Throwable
getPassivations
public long getPassivations()
- Description copied from interface:
PassivationInterceptorMBean
- Returns the number of cache node passivations
- Specified by:
getPassivations
in interface PassivationInterceptorMBean
- Returns:
- the number of cache node passivations
resetStatistics
public void resetStatistics()
- Description copied from class:
Interceptor
- This implementation is a no-op. If individual Interceptors wish to expose statistics, they can override this
method.
- Specified by:
resetStatistics
in interface InterceptorMBean
- Overrides:
resetStatistics
in class Interceptor
dumpStatistics
public Map<String,Object> dumpStatistics()
- Description copied from class:
Interceptor
- This implementation returns an empty Map. If individual Interceptors wish to expose statistics, they can override this
method.
- Specified by:
dumpStatistics
in interface InterceptorMBean
- Overrides:
dumpStatistics
in class Interceptor
- Returns:
- a map containing statistics
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.