org.jboss.cache.interceptors
Class ActivationInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.BaseCacheLoaderInterceptor
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.22 2006/02/18 20:45:54 jerrygauth Exp $
- Author:
- {Hany Mesha}
Field Summary |
protected static java.lang.Object |
NULL
|
protected EDU.oswego.cs.dl.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 |
dumpStatistics()
Returns a map of the cache interceptor's statistics
Map elements consist of {String name, Object value} entries |
long |
getActivations()
Returns the number of cache node activations |
protected CacheLoader |
getLoader()
|
protected boolean |
hasModifications(java.lang.Object[] args)
|
java.lang.Object |
invoke(org.jgroups.blocks.MethodCall m)
Makes sure a node is loaded into memory before a call executes. |
void |
resetStatistics()
Resets an interceptor's cache statistics |
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 |
tx_mgr
protected javax.transaction.TransactionManager tx_mgr
tx_table
protected TransactionTable tx_table
transactions
protected EDU.oswego.cs.dl.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(org.jgroups.blocks.MethodCall m)
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
- Parameters:
m
-
- 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 interface:
InterceptorMBean
- Resets an interceptor's cache statistics
- Specified by:
resetStatistics
in interface InterceptorMBean
- Overrides:
resetStatistics
in class CacheLoaderInterceptor
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 CacheLoaderInterceptor
- Returns:
- a map containing statistics
hasModifications
protected boolean hasModifications(java.lang.Object[] args)
getLoader
protected CacheLoader getLoader()
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.