org.jboss.cache.interceptors
Class CacheStoreInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.BaseCacheLoaderInterceptor
org.jboss.cache.interceptors.CacheStoreInterceptor
- All Implemented Interfaces:
- CacheStoreInterceptorMBean, InterceptorMBean
public class CacheStoreInterceptor
- extends BaseCacheLoaderInterceptor
- implements CacheStoreInterceptorMBean
Writes modifications back to the store on the way out: stores modifications back
through the CacheLoader, either after each method call (no TXs), or at TX commit.
- Version:
- $Id: CacheStoreInterceptor.java,v 1.18 2006/04/01 17:40:12 msurtani Exp $
- Author:
- Bela Ban
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 |
loaderConfig
protected CacheLoaderConfig loaderConfig
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
CacheStoreInterceptor
public CacheStoreInterceptor()
setCache
public void setCache(TreeCache cache)
- Overrides:
setCache
in class BaseCacheLoaderInterceptor
invoke
public java.lang.Object invoke(org.jgroups.blocks.MethodCall m)
throws java.lang.Throwable
- Pass the method on. When it returns, store the modification back to the store using the CacheLoader.
In case of a transaction, register for TX completion (2PC) and at TX commit, write modifications made
under the given TX to the CacheLoader
- Overrides:
invoke
in class Interceptor
- Parameters:
m
-
- Returns:
-
- Throws:
java.lang.Throwable
getCacheLoaderStores
public long getCacheLoaderStores()
- Description copied from interface:
CacheStoreInterceptorMBean
- Returns the number of cache loader stores
- Specified by:
getCacheLoaderStores
in interface CacheStoreInterceptorMBean
- Returns:
- the number of cache loader stores
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
convertMethodCallToModification
protected Modification convertMethodCallToModification(org.jgroups.blocks.MethodCall methodCall)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.