org.jboss.cache.interceptors
Class PassivationInterceptor
java.lang.Object
org.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
org.jboss.cache.interceptors.base.JmxStatsCommandInterceptor
org.jboss.cache.interceptors.PassivationInterceptor
- All Implemented Interfaces:
- Visitor, JmxStatisticsExposer
- Direct Known Subclasses:
- LegacyPassivationInterceptor
public class PassivationInterceptor
- extends JmxStatsCommandInterceptor
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 7168 2008-11-19 17:37:20Z jason.greene@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,
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.
passivate
protected void passivate(InvocationContext ctx,
Fqn fqn)
throws Throwable
- Throws:
Throwable
resetStatistics
public void resetStatistics()
- Description copied from class:
JmxStatsCommandInterceptor
- Resets statistics gathered. Is a no-op, and should be overridden if it is to be meaningful.
- Specified by:
resetStatistics
in interface JmxStatisticsExposer
- Overrides:
resetStatistics
in class JmxStatsCommandInterceptor
dumpStatistics
public Map<String,Object> dumpStatistics()
- Description copied from class:
JmxStatsCommandInterceptor
- 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 JmxStatisticsExposer
- Overrides:
dumpStatistics
in class JmxStatsCommandInterceptor
- Returns:
- an empty map
getPassivations
public long getPassivations()
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.