org.jboss.cache.interceptors
Class PassivationInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.PassivationInterceptor
- All Implemented Interfaces:
- InterceptorMBean, PassivationInterceptorMBean
public class PassivationInterceptor
- extends Interceptor
- 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,v 1.22.2.1 2006/10/30 04:40:57 bstansberry Exp $
- Author:
- {Hany Mesha}
Method Summary |
java.util.Map |
dumpStatistics()
Returns a map of the cache interceptor's statistics
Map elements consist of {String name, Object value} entries |
long |
getPassivations()
Returns the number of cache node passivations |
java.lang.Object |
invoke(org.jgroups.blocks.MethodCall call)
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. |
void |
resetStatistics()
Resets an interceptor's cache statistics |
void |
setCache(TreeCache cache)
|
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
getInvocationContext, getNext, getStatisticsEnabled, isActive, isBuddyGroupOrganisationMethod, isOnePhaseCommitPrepareMehod, isPreparing, isTransactionLifecycleMethod, isValid, setInvocationContext, setNext, setStatisticsEnabled |
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()
setCache
public void setCache(TreeCache cache)
- Overrides:
setCache
in class Interceptor
invoke
public java.lang.Object invoke(org.jgroups.blocks.MethodCall call)
throws java.lang.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:
invoke
in class Interceptor
- Parameters:
m
-
- Returns:
-
- Throws:
java.lang.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 interface:
InterceptorMBean
- Resets an interceptor's cache statistics
- Specified by:
resetStatistics
in interface InterceptorMBean
- Overrides:
resetStatistics
in class Interceptor
dumpStatistics
public java.util.Map dumpStatistics()
- Description copied from interface:
InterceptorMBean
- Returns a map of the cache interceptor's statistics
Map elements consist of {String name, Object value} entries
- Specified by:
dumpStatistics
in interface InterceptorMBean
- Overrides:
dumpStatistics
in class Interceptor
- Returns:
- a map containing statistics
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.