org.jboss.cache.interceptors
Class ActivationInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.CacheLoaderInterceptor
org.jboss.cache.interceptors.ActivationInterceptor
- All Implemented Interfaces:
- ActivationInterceptorMBean, CacheLoaderInterceptorMBean, InterceptorMBean
public class ActivationInterceptor
- extends CacheLoaderInterceptor
- implements ActivationInterceptorMBean
Loads nodes that don't exist at the time of the call into memory from the CacheLoader.
If the nodes were evicted earlier then we remove them from the cache loader after
their attributes have been initialized and their children have been loaded in memory.
- Version:
- $Id: ActivationInterceptor.java,v 1.62 2007/07/17 02:03:26 msurtani Exp $
- Author:
- {Hany Mesha}
Field Summary |
protected static java.lang.Object |
NULL
|
protected java.util.concurrent.ConcurrentHashMap |
transactions
List that we have registered for |
protected javax.transaction.TransactionManager |
tx_mgr
|
protected TransactionTable |
tx_table
|
Method Summary |
java.util.Map<java.lang.String,java.lang.Object> |
dumpStatistics()
This implementation returns an empty Map. |
long |
getActivations()
Returns the number of cache node activations |
protected boolean |
hasModifications(java.lang.Object[] args)
|
java.lang.Object |
invoke(InvocationContext ctx)
Makes sure a node is loaded into memory before a call executes. |
void |
resetStatistics()
This implementation is a no-op. |
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
getLast, getNext, getStatisticsEnabled, isActive, isOnePhaseCommitPrepareMehod, isPreparing, isValid, setLast, setNext, setStatisticsEnabled, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
tx_mgr
protected javax.transaction.TransactionManager tx_mgr
tx_table
protected TransactionTable tx_table
transactions
protected java.util.concurrent.ConcurrentHashMap transactions
- List that we have registered for
NULL
protected static final java.lang.Object NULL
ActivationInterceptor
public ActivationInterceptor()
invoke
public java.lang.Object invoke(InvocationContext ctx)
throws java.lang.Throwable
- Makes sure a node is loaded into memory before a call executes. If node is
already loaded and its attributes already initialized, then remove it from
the cache loader and notify the cache listeners that the node has been activated.
- Overrides:
invoke
in class CacheLoaderInterceptor
- Returns:
-
- Throws:
java.lang.Throwable
getActivations
public long getActivations()
- Description copied from interface:
ActivationInterceptorMBean
- Returns the number of cache node activations
- Specified by:
getActivations
in interface ActivationInterceptorMBean
- Returns:
- the number of cache node activations
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 CacheLoaderInterceptor
dumpStatistics
public java.util.Map<java.lang.String,java.lang.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 CacheLoaderInterceptor
- Returns:
- a map containing statistics
hasModifications
protected boolean hasModifications(java.lang.Object[] args)