[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
manik at jboss.org
Thu Jul 12 12:34:52 EDT 2007
User: msurtani
Date: 07/07/12 12:34:52
Modified: src/org/jboss/cache/interceptors CacheStoreInterceptor.java
Log:
Should be making direct cache loader calls such as put(Map) rather than a mod list
Revision Changes Path
1.51 +22 -20 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.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- CacheStoreInterceptor.java 18 Jun 2007 23:57:27 -0000 1.50
+++ CacheStoreInterceptor.java 12 Jul 2007 16:34:51 -0000 1.51
@@ -16,7 +16,6 @@
import javax.transaction.TransactionManager;
import java.lang.reflect.Method;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -28,7 +27,7 @@
* through the CacheLoader, either after each method call (no TXs), or at TX commit.
*
* @author Bela Ban
- * @version $Id: CacheStoreInterceptor.java,v 1.50 2007/06/18 23:57:27 msurtani Exp $
+ * @version $Id: CacheStoreInterceptor.java,v 1.51 2007/07/12 16:34:51 msurtani Exp $
*/
public class CacheStoreInterceptor extends Interceptor implements CacheStoreInterceptorMBean
{
@@ -182,12 +181,15 @@
case MethodDeclarations.moveMethodLocal_id:
doMove((Fqn) args[0], (Fqn) args[1]);
break;
- case MethodDeclarations.putDataMethodLocal_id:
case MethodDeclarations.putDataEraseMethodLocal_id:
- Modification mod = convertMethodCallToModification(m);
- log.debug(mod);
- fqn = mod.getFqn();
- loader.put(Collections.singletonList(mod));
+ // aside from this removeData call, this is the same as a putData call.
+ loader.removeData((Fqn) args[1]);
+ case MethodDeclarations.putDataMethodLocal_id:
+// Modification mod = convertMethodCallToModification(m);
+// log.debug(mod);
+// fqn = mod.getFqn();
+// loader.put(Collections.singletonList(mod));
+ loader.put((Fqn) args[1], (Map) args[2]);
if (configuration.getExposeManagementStatistics() && getStatisticsEnabled())
{
m_cacheStores++;
More information about the jboss-cvs-commits
mailing list