org.jboss.cache.interceptors
Class PassivationInterceptor
java.lang.Object
org.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
org.jboss.cache.interceptors.PassivationInterceptor
- All Implemented Interfaces:
- Visitor, InterceptorMBean, PassivationInterceptorMBean
public class PassivationInterceptor
- extends CommandInterceptor
- 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 6000 2008-06-17 23:43:54Z manik.surtani@jboss.com $
- Author:
- {Hany Mesha}
Methods inherited from class org.jboss.cache.commands.AbstractVisitor |
visitClearDataCommand, visitCollection, visitCommitCommand, visitCreateNodeCommand, visitExistsNodeCommand, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitOptimisticPrepareCommand, visitPrepareCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand, visitRollbackCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
loader
protected CacheLoader loader
PassivationInterceptor
public PassivationInterceptor()
setDependencies
public void setDependencies(Notifier notifier,
DataContainer dataContainer,
CacheLoaderManager loaderManager)
visitEvictFqnCommand
public Object visitEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
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.
- Specified by:
visitEvictFqnCommand
in interface Visitor
- Overrides:
visitEvictFqnCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
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:
CommandInterceptor
- Resets statistics gathered. Is a no-op, and should be overridden if it is to be meaningful.
- Specified by:
resetStatistics
in interface InterceptorMBean
- Overrides:
resetStatistics
in class CommandInterceptor
dumpStatistics
public Map<String,Object> dumpStatistics()
- Description copied from class:
CommandInterceptor
- Returns a map of statistics. This is a default implementation which returns an empty map and should be overridden
if it is to be meaningful.
- Specified by:
dumpStatistics
in interface InterceptorMBean
- Overrides:
dumpStatistics
in class CommandInterceptor
- Returns:
- an empty map
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.