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.17 2006/03/15 16:02:38 genman 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 m)
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, 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 m)
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.
In case of a transaction, register for TX completion (2PC) and at TX commit,
The evicted node write made under the given TX to 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.