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 4138 2007-07-13 14:31:42Z msurtani $
- Author:
- {Hany Mesha}
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
getLast, getNext, getStatisticsEnabled, isActive, isOnePhaseCommitPrepareMehod, isPreparing, isValid, setLast, setNext, setStatisticsEnabled, toString |
loader
protected CacheLoader loader
PassivationInterceptor
public PassivationInterceptor()
setCache
public void setCache(CacheSPI cache)
- Overrides:
setCache
in class Interceptor
invoke
public Object invoke(InvocationContext ctx)
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:
invoke
in class Interceptor
- Returns:
-
- 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 © 2007 JBoss, a division of Red Hat. All Rights Reserved.