[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Jimmy Wilson
jawilson at redhat.com
Sun Jun 24 17:09:40 EDT 2007
User: jawilson
Date: 07/06/24 17:09:40
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0 CacheStoreInterceptor.java
CacheLoaderInterceptor.java
Log:
Fix for [JBCACHE-1103] (backport). Corrected compile-time problems created by hierarchy change.
Revision Changes Path
No revision
No revision
1.26.2.3 +4 -2 JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheStoreInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java,v
retrieving revision 1.26.2.2
retrieving revision 1.26.2.3
diff -u -b -r1.26.2.2 -r1.26.2.3
--- CacheStoreInterceptor.java 24 Jun 2007 20:53:14 -0000 1.26.2.2
+++ CacheStoreInterceptor.java 24 Jun 2007 21:09:40 -0000 1.26.2.3
@@ -8,6 +8,7 @@
import org.jboss.cache.TransactionTable;
import org.jboss.cache.TreeCache;
import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.marshall.MethodDeclarations;
import org.jboss.cache.marshall.JBCMethodCall;
import org.jgroups.blocks.MethodCall;
@@ -25,7 +26,7 @@
* 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.
* @author Bela Ban
- * @version $Id: CacheStoreInterceptor.java,v 1.26.2.2 2007/06/24 20:53:14 jawilson Exp $
+ * @version $Id: CacheStoreInterceptor.java,v 1.26.2.3 2007/06/24 21:09:40 jawilson Exp $
*/
public class CacheStoreInterceptor extends Interceptor implements CacheStoreInterceptorMBean
{
@@ -36,12 +37,14 @@
private HashMap m_txStores = new HashMap();
private Map preparingTxs = new ConcurrentHashMap();
private long m_cacheStores = 0;
+ protected CacheLoader loader;
public void setCache(TreeCache cache) {
super.setCache(cache);
this.loaderConfig = cache.getCacheLoaderManager().getCacheLoaderConfig();
tx_mgr=cache.getTransactionManager();
tx_table=cache.getTransactionTable();
+ this.loader = cache.getCacheLoaderManager().getCacheLoader();
}
/**
@@ -89,7 +92,6 @@
if (log.isTraceEnabled()) log.trace("Calling loader.commit() for gtx " + gtx);
// sync call (a write) on the loader
List fqnsModified = getFqnsFromModificationList(tx_table.get(gtx).getCacheLoaderModifications());
- obtainLoaderLocks(fqnsModified);
try
{
loader.commit(gtx);
1.40.2.5 +4 -2 JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
retrieving revision 1.40.2.4
retrieving revision 1.40.2.5
diff -u -b -r1.40.2.4 -r1.40.2.5
--- CacheLoaderInterceptor.java 24 Jun 2007 20:53:14 -0000 1.40.2.4
+++ CacheLoaderInterceptor.java 24 Jun 2007 21:09:40 -0000 1.40.2.5
@@ -29,7 +29,7 @@
* Loads nodes that don't exist at the time of the call into memory from the CacheLoader
*
* @author Bela Ban
- * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.4 2007/06/24 20:53:14 jawilson Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.5 2007/06/24 21:09:40 jawilson Exp $
*/
public class CacheLoaderInterceptor extends Interceptor implements CacheLoaderInterceptorMBean
{
@@ -37,6 +37,7 @@
private long m_cacheLoads = 0;
private long m_cacheMisses = 0;
private TransactionTable txTable = null;
+ protected CacheLoader loader;
/**
* True if CacheStoreInterceptor is in place.
@@ -48,8 +49,9 @@
public void setCache(TreeCache cache)
{
super.setCache(cache);
- isCustomCacheLoader = isCustomCacheLoaderConfigured(loader);
txTable = cache.getTransactionTable();
+ this.loader = cache.getCacheLoaderManager().getCacheLoader();
+ isCustomCacheLoader = isCustomCacheLoaderConfigured(loader);
}
private boolean isCustomCacheLoaderConfigured(CacheLoader cl)
More information about the jboss-cvs-commits
mailing list