JBoss Cache SVN: r5733 - in core/trunk/src/test/java/org/jboss/cache: statetransfer and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-28 12:56:40 -0400 (Mon, 28 Apr 2008)
New Revision: 5733
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
Log:
JBCACHE-1222 - fixed state transfer test
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java 2008-04-28 16:20:15 UTC (rev 5732)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java 2008-04-28 16:56:40 UTC (rev 5733)
@@ -1,9 +1,7 @@
package org.jboss.cache.eviction;
-import org.jboss.cache.CacheSPI;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.Fqn;
+import org.jboss.cache.*;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
@@ -328,4 +326,21 @@
val = (String) cache.get(rootStr + "3", rootStr + "3");
assertNull("Node should be empty ", val);
}
+
+ public void testOvereviction() throws Exception
+ {
+ Configuration c = UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.LOCAL, true);
+ Cache<Object, Object> cache1 = new DefaultCacheFactory().createCache(c, true);
+ cache1.put(Fqn.fromString("/base/" + 0), "key", "base" + 0);
+ Node node = cache1.getRoot().getChild(Fqn.fromString("/base/"));
+ node.setResident(true);
+
+ for (int i = 1; i < 5100; i++)
+ {
+ cache1.put(Fqn.fromString("/base/" + i), "key", "base" + i);
+ }
+ Thread.sleep(5000);
+ assertEquals(5000, cache1.getRoot().getChild(Fqn.fromString("/base")).getChildren().size());
+
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2008-04-28 16:20:15 UTC (rev 5732)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2008-04-28 16:56:40 UTC (rev 5733)
@@ -14,7 +14,9 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.Region;
+import org.jboss.cache.eviction.LRUConfiguration;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.marshall.InactiveRegionException;
@@ -503,22 +505,35 @@
for (int i = 0; i < 25000; i++)
{
- cache1.put(Fqn.fromString("/base/" + i), "key", "base" + i);
+ cache1.put(Fqn.fromString("/org/jboss/data/" + i), "key", "base" + i);
if (i < 5)
{
cache1.put(Fqn.fromString("/org/jboss/test/data/" + i), "key", "data" + i);
+ if (i == 0)
+ {
+ cache1.getRoot().getChild(Fqn.fromString("/org/jboss/data")).setResident(true); //so that it won't be counted for eviction
+ }
}
}
+ Thread.sleep(5000);
+ assert cache1.getRoot().getChild(Fqn.fromString("/org/jboss/data")).getChildren().size() == 5000;
+
c = UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC, true);
final Cache<Object, Object> cache2 = new DefaultCacheFactory().createCache(c, false);
+ log.info("***** before starting the second cache");
cache2.start();
+ log.info("***** after starting the second cache");
caches.put("evict2", cache2);
Node<Object, Object> parent = cache2.getRoot().getChild(Fqn.fromString("/org/jboss/test/data"));
- parent = cache2.getRoot().getChild(Fqn.fromString("/base"));
+ parent = cache2.getRoot().getChild(Fqn.fromString("/org/jboss/data"));
Set children = parent.getChildren();
- assertTrue("Minimum number of base children transferred", children.size() >= 5000);
+ System.out.println("children.size() = " + children.size());
+ System.out.println("cache1.children size = " + cache1.getRoot().getChild(Fqn.fromString("/org/jboss/data")).getChildren().size());
+ log.info("***** cache1.children size = " + cache1.getRoot().getChild(Fqn.fromString("/org/jboss/data")).getChildren().size());
+ log.info("***** children.size() = " + children.size());
+ assertTrue("Minimum number of base children transferred", children.size() >= 4999); //4999 because the root of the region will also be counted, as it is not resident
// Sleep 2.5 secs so the nodes we are about to create in data won't
// exceed the 4 sec TTL when eviction thread runs
@@ -537,7 +552,7 @@
{
try
{
- cache.put(Fqn.fromString("/base/" + i), "key", "base" + i);
+ cache.put(Fqn.fromString("/org/jboss/data/" + i), "key", "base" + i);
cache.put(Fqn.fromString("/org/jboss/test/data/" + i), "key", "data" + i);
i++;
}
@@ -574,14 +589,13 @@
{
System.out.println("data " + dataCount + " < " + maxCountData + " elapsed = " + (System.currentTimeMillis() - start));
sawDataDecrease = true;
- }
- else
+ } else
{
maxCountData = dataCount;
}
}
- parent = cache2.getRoot().getChild(Fqn.fromString("/base"));
+ parent = cache2.getRoot().getChild(Fqn.fromString("/org/jboss/data"));
children = parent.getChildren();
if (children != null)
{
@@ -590,8 +604,7 @@
{
System.out.println("base " + baseCount + " < " + maxCountBase + " elapsed = " + (System.currentTimeMillis() - start));
sawBaseDecrease = true;
- }
- else
+ } else
{
maxCountBase = baseCount;
}
@@ -625,7 +638,7 @@
System.out.println(children.size());
assertTrue("Excess children evicted", children.size() <= 5);
}
- parent = cache2.getRoot().getChild(Fqn.fromString("/base"));
+ parent = cache2.getRoot().getChild(Fqn.fromString("/org/jboss/data"));
children = parent.getChildren();
if (children != null)
{
@@ -645,7 +658,51 @@
}
}
+ /**
+ * tests that after the state transfer takes place the correct number of nodes is being evcited.
+ */
+ public void testEvictionAfterStateTransferSimple() throws Exception
+ {
+ Configuration c = UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC, true);
+ String baseRegion = "/base";
+ int maxRegionNodeCount = 5;
+// //set max node node to 5 on default
+ ((LRUConfiguration)c.getEvictionConfig().getEvictionRegionConfigs().get(0).getEvictionPolicyConfig()).setMaxNodes(maxRegionNodeCount);
+ EvictionRegionConfig baseRegionConfig = c.getEvictionConfig().getEvictionRegionConfigs().get(1).clone();
+ baseRegionConfig.setRegionFqn(Fqn.fromString(baseRegion));
+ ((LRUConfiguration)baseRegionConfig.getEvictionPolicyConfig()).setMaxAgeSeconds(1000);
+ ((LRUConfiguration)baseRegionConfig.getEvictionPolicyConfig()).setMaxNodes(maxRegionNodeCount);
+ c.getEvictionConfig().getEvictionRegionConfigs().add(baseRegionConfig);
+
+
+ Cache<Object, Object> cache1 = new DefaultCacheFactory().createCache(c, true);
+ caches.put("evict1", cache1);
+ cache1.getRegion(Fqn.fromString(baseRegion), true).activate();
+
+ for (int i = 0; i < maxRegionNodeCount + 5; i++)
+ {
+ cache1.put(Fqn.fromString(baseRegion + "/" + i), "key", "base" + i);
+ if (i == 0)
+ {
+ cache1.getRoot().getChild(Fqn.fromString(baseRegion)).setResident(true); //so that it won't be counted for eviction
+ }
+ }
+ cache1.put(Fqn.fromString("/org/jboss/test/data/" + 0), "key", "data" + 0);
+
+ Thread.sleep(5000);
+ assert cache1.getRoot().getChild(Fqn.fromString(baseRegion)).getChildren().size() == maxRegionNodeCount;
+ System.out.println("cache1.getRoot().getChild(Fqn.fromString(baseRegion)).getChildren().size() = " + cache1.getRoot().getChild(Fqn.fromString(baseRegion)).getChildren());
+
+ final Cache<Object, Object> cache2 = new DefaultCacheFactory().createCache(c.clone(), false);
+ cache2.start();
+ caches.put("evict2", cache2);
+ Thread.sleep(5000);
+
+ Node parent = cache2.getRoot().getChild(Fqn.fromString(baseRegion));
+ Set children = parent.getChildren();
+ }
+
private class CacheActivator extends CacheUser
{
16 years, 8 months
JBoss Cache SVN: r5732 - core/trunk/src/main/java/org/jboss/cache/commands/write.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-28 12:20:15 -0400 (Mon, 28 Apr 2008)
New Revision: 5732
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
Log:
Javadoc
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 16:18:36 UTC (rev 5731)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 16:20:15 UTC (rev 5732)
@@ -27,9 +27,9 @@
/**
* Returns false if the node still exists; i.e. was only data removed because it still has children.
- *
- * @see org.jboss.cache.interceptors.EvictionInterceptor#visitEvictFqnCommand(org.jboss.cache.InvocationContext, EvictCommand)
- * there is wehere this attribute is used
+ * <p/>
+ * See {@link org.jboss.cache.interceptors.EvictionInterceptor#visitEvictFqnCommand(org.jboss.cache.InvocationContext, EvictCommand)}
+ * which is where this return value is used
*/
public Object perform(InvocationContext ctx)
{
16 years, 8 months
JBoss Cache SVN: r5731 - core/trunk/src/main/java/org/jboss/cache/eviction.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-28 12:18:36 -0400 (Mon, 28 Apr 2008)
New Revision: 5731
Modified:
core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java
Log:
Removed unnecessary "public" modifiers
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java 2008-04-28 16:16:56 UTC (rev 5730)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java 2008-04-28 16:18:36 UTC (rev 5731)
@@ -20,7 +20,7 @@
* @author Ben Wang 02-2004
* @author Daniel Huang - dhuang(a)jboss.org
*/
-public class LRUAlgorithm extends BaseEvictionAlgorithm implements EvictionAlgorithm
+public class LRUAlgorithm extends BaseEvictionAlgorithm
{
private static final Log log = LogFactory.getLog(LRUAlgorithm.class);
16 years, 8 months
JBoss Cache SVN: r5730 - in core/trunk/src/main/java/org/jboss/cache: buddyreplication and 8 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-28 12:16:56 -0400 (Mon, 28 Apr 2008)
New Revision: 5730
Modified:
core/trunk/src/main/java/org/jboss/cache/Region.java
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyLocator.java
core/trunk/src/main/java/org/jboss/cache/config/Configuration.java
core/trunk/src/main/java/org/jboss/cache/eviction/BaseSortedEvictionAlgorithm.java
core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizePolicy.java
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionQueue.java
core/trunk/src/main/java/org/jboss/cache/eviction/FIFOPolicy.java
core/trunk/src/main/java/org/jboss/cache/eviction/LFUAlgorithm.java
core/trunk/src/main/java/org/jboss/cache/eviction/LFUPolicy.java
core/trunk/src/main/java/org/jboss/cache/eviction/LRUPolicy.java
core/trunk/src/main/java/org/jboss/cache/eviction/MRUPolicy.java
core/trunk/src/main/java/org/jboss/cache/eviction/SortedEvictionQueue.java
core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java
core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapperMBean.java
core/trunk/src/main/java/org/jboss/cache/jmx/CacheNotificationBroadcaster.java
core/trunk/src/main/java/org/jboss/cache/lock/LockUtil.java
core/trunk/src/main/java/org/jboss/cache/lock/NodeLock.java
core/trunk/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java
core/trunk/src/main/java/org/jboss/cache/notifications/event/Event.java
core/trunk/src/main/java/org/jboss/cache/optimistic/DataVersion.java
core/trunk/src/main/java/org/jboss/cache/optimistic/TransactionWorkspace.java
core/trunk/src/main/java/org/jboss/cache/statetransfer/StateTransferGenerator.java
Log:
Removed unnecessary "public" modifiers
Modified: core/trunk/src/main/java/org/jboss/cache/Region.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/Region.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/Region.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -37,7 +37,7 @@
/**
* Types of regions.
*/
- public enum Type
+ enum Type
{
EVICTION, MARSHALLING, ANY
}
@@ -45,7 +45,7 @@
/**
* Region status
*/
- public enum Status
+ enum Status
{
ACTIVATING, ACTIVE, INACTIVATING, INACTIVE
}
@@ -82,7 +82,7 @@
* either contains data or children, no state transfers take place. The region is simply marked as active in this
* case.
*/
- public void activateIfEmpty();
+ void activateIfEmpty();
/**
* Deactivates this region from being replicated.
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyLocator.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyLocator.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyLocator.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -33,7 +33,7 @@
* returned value should be the default config for the
* given BuddyLocator implementation.
*/
- public BuddyLocatorConfig getConfig();
+ BuddyLocatorConfig getConfig();
/**
* Initialize this <code>BuddyLocator</code>.
@@ -42,7 +42,7 @@
* <code>null</code>, in which case the implementation should
* use its default configuration.
*/
- public void init(BuddyReplicationConfig.BuddyLocatorConfig config);
+ void init(BuddyReplicationConfig.BuddyLocatorConfig config);
/**
* Choose a set of buddies for the given node. Invoked when a change in
@@ -60,5 +60,5 @@
* <code>dataOwner</code>. Will not be <code>null</code>, may
* be empty.
*/
- public List<Address> locateBuddies(Map<Address, String> buddyPoolMap, List<Address> currentMembership, Address dataOwner);
+ List<Address> locateBuddies(Map<Address, String> buddyPoolMap, List<Address> currentMembership, Address dataOwner);
}
Modified: core/trunk/src/main/java/org/jboss/cache/config/Configuration.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/Configuration.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/config/Configuration.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -20,9 +20,7 @@
*
* @author <a href="mailto:manik@jboss.org">Manik Surtani (manik(a)jboss.org)</a>
*/
-public class Configuration
- extends ConfigurationComponent
- implements Cloneable
+public class Configuration extends ConfigurationComponent
{
private static final long serialVersionUID = 5553791890144997466L;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/BaseSortedEvictionAlgorithm.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/BaseSortedEvictionAlgorithm.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/BaseSortedEvictionAlgorithm.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -23,7 +23,7 @@
*
* @author Daniel Huang - dhuang(a)jboss.org - 10/2005
*/
-public abstract class BaseSortedEvictionAlgorithm extends BaseEvictionAlgorithm implements EvictionAlgorithm
+public abstract class BaseSortedEvictionAlgorithm extends BaseEvictionAlgorithm
{
private static final Log log = LogFactory.getLog(BaseSortedEvictionAlgorithm.class);
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizePolicy.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizePolicy.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizePolicy.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -10,7 +10,7 @@
* @author Daniel Huang
* @version $Revison: $
*/
-public class ElementSizePolicy extends BaseEvictionPolicy implements EvictionPolicy
+public class ElementSizePolicy extends BaseEvictionPolicy
{
private ElementSizeAlgorithm algorithm;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/EvictionQueue.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/EvictionQueue.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/EvictionQueue.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -31,7 +31,7 @@
*
* @return first NodeEntry in queue.
*/
- public NodeEntry getFirstNodeEntry();
+ NodeEntry getFirstNodeEntry();
/**
* Retrieve a node entry by Fqn.
@@ -41,9 +41,9 @@
* @param fqn Fqn of the node entry to retrieve.
* @return Node Entry object associated with given Fqn param.
*/
- public NodeEntry getNodeEntry(Fqn fqn);
+ NodeEntry getNodeEntry(Fqn fqn);
- public NodeEntry getNodeEntry(String fqn);
+ NodeEntry getNodeEntry(String fqn);
/**
* Check if queue contains the given NodeEntry.
@@ -51,7 +51,7 @@
* @param entry NodeEntry to check for existence in queue.
* @return true/false if NodeEntry exists in queue.
*/
- public boolean containsNodeEntry(NodeEntry entry);
+ boolean containsNodeEntry(NodeEntry entry);
/**
* Remove a NodeEntry from queue.
@@ -60,36 +60,36 @@
*
* @param entry The NodeEntry to remove from queue.
*/
- public void removeNodeEntry(NodeEntry entry);
+ void removeNodeEntry(NodeEntry entry);
/**
* Add a NodeEntry to the queue.
*
* @param entry The NodeEntry to add to queue.
*/
- public void addNodeEntry(NodeEntry entry);
+ void addNodeEntry(NodeEntry entry);
/**
* Get the number of nodes in the queue.
*
* @return The number of nodes in the queue.
*/
- public int getNumberOfNodes();
+ int getNumberOfNodes();
/**
* Get the number of elements in the queue.
*
* @return The number of elements in the queue.
*/
- public int getNumberOfElements();
+ int getNumberOfElements();
- public void modifyElementCount(int difference);
+ void modifyElementCount(int difference);
- public Iterator iterate();
+ Iterator iterate();
/**
* Clear the queue.
*/
- public void clear();
+ void clear();
}
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/FIFOPolicy.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/FIFOPolicy.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/FIFOPolicy.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -14,7 +14,7 @@
* @author Morten Kvistgaard
* @version $Revision$
*/
-public class FIFOPolicy extends BaseEvictionPolicy implements EvictionPolicy
+public class FIFOPolicy extends BaseEvictionPolicy
{
private FIFOAlgorithm algorithm;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/LFUAlgorithm.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/LFUAlgorithm.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/LFUAlgorithm.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -32,7 +32,7 @@
* @author Daniel Huang - dhuang(a)jboss.org 10/2005
* @version $Revision$
*/
-public class LFUAlgorithm extends BaseSortedEvictionAlgorithm implements EvictionAlgorithm
+public class LFUAlgorithm extends BaseSortedEvictionAlgorithm
{
private static final Log log = LogFactory.getLog(LFUAlgorithm.class);
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/LFUPolicy.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/LFUPolicy.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/LFUPolicy.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -12,7 +12,7 @@
* @author Daniel Huang - dhuang(a)jboss.org - 10/2005
* @version $Revision$
*/
-public class LFUPolicy extends BaseEvictionPolicy implements EvictionPolicy
+public class LFUPolicy extends BaseEvictionPolicy
{
private LFUAlgorithm algorithm;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/LRUPolicy.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/LRUPolicy.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/LRUPolicy.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -18,7 +18,7 @@
* @author Daniel Huang - dhuang(a)jboss.org
* @version $Revision$
*/
-public class LRUPolicy extends BaseEvictionPolicy implements EvictionPolicy
+public class LRUPolicy extends BaseEvictionPolicy
{
protected RegionManager regionManager_;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/MRUPolicy.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/MRUPolicy.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/MRUPolicy.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -14,7 +14,7 @@
* @author Daniel Huang (dhuang(a)jboss.org)
* @version $Revision$
*/
-public class MRUPolicy extends BaseEvictionPolicy implements EvictionPolicy
+public class MRUPolicy extends BaseEvictionPolicy
{
private MRUAlgorithm algorithm;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/SortedEvictionQueue.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/SortedEvictionQueue.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/SortedEvictionQueue.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -17,5 +17,5 @@
/**
* Provide contract to resort a sorted queue.
*/
- public void resortEvictionQueue();
+ void resortEvictionQueue();
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -43,7 +43,7 @@
* @deprecated this will be removed in a 3.x release. Please use {@link org.jboss.cache.interceptors.base.CommandInterceptor} instead, since it provides strongly typed callbacks which are more efficient.
*/
@Deprecated
-public abstract class Interceptor extends CommandInterceptor implements InterceptorMBean
+public abstract class Interceptor extends CommandInterceptor
{
protected CacheSPI<?, ?> cache;
protected Log log = null;
Modified: core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapperMBean.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapperMBean.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapperMBean.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -28,25 +28,43 @@
*/
public interface CacheJmxWrapperMBean<K, V> extends LegacyConfiguration
{
- /** The lifecycle method stop has completed */
- public static final int STOPPED = 0;
- /** The lifecycle method stop has been invoked */
- public static final int STOPPING = 1;
- /** The lifecycle method start has been invoked */
- public static final int STARTING = 2;
- /** The lifecycle method start has completed */
- public static final int STARTED = 3;
- /** There has been an error during some operation */
- public static final int FAILED = 4;
- /** The lifecycle method destroy has completed */
- public static final int DESTROYED = 5;
- /** The lifecycle method create has completed */
- public static final int CREATED = 6;
- /** The MBean has been instantiated but has not completed MBeanRegistration.postRegister */
- public static final int UNREGISTERED = 7;
- /** The MBean has been instantiated and has completed MBeanRegistration.postRegister */
- public static final int REGISTERED = 8;
-
+ /**
+ * The lifecycle method stop has completed
+ */
+ int STOPPED = 0;
+ /**
+ * The lifecycle method stop has been invoked
+ */
+ int STOPPING = 1;
+ /**
+ * The lifecycle method start has been invoked
+ */
+ int STARTING = 2;
+ /**
+ * The lifecycle method start has completed
+ */
+ int STARTED = 3;
+ /**
+ * There has been an error during some operation
+ */
+ int FAILED = 4;
+ /**
+ * The lifecycle method destroy has completed
+ */
+ int DESTROYED = 5;
+ /**
+ * The lifecycle method create has completed
+ */
+ int CREATED = 6;
+ /**
+ * The MBean has been instantiated but has not completed MBeanRegistration.postRegister
+ */
+ int UNREGISTERED = 7;
+ /**
+ * The MBean has been instantiated and has completed MBeanRegistration.postRegister
+ */
+ int REGISTERED = 8;
+
void create() throws CacheException;
void start() throws CacheException;
@@ -54,20 +72,20 @@
void stop();
void destroy();
-
+
/**
* Gets where this object is in its lifecycle transitions.
- *
+ *
* @return the current status. Will not return <code>null</code>
*/
CacheStatus getCacheStatus();
-
+
/**
- * Legacy attribute to expose the {@link #getCacheStatus() cache status}
+ * Legacy attribute to expose the {@link #getCacheStatus() cache status}
* in terms of the JBoss AS ServiceMBean values. This interface does
* not extend ServiceMBean, but this attribute is retained to provide
* compatibility with the JBoss AS JSR-77 integration layer.
- *
+ *
* @return the current status, e.g. {@link #STARTED}.
*/
int getState();
Modified: core/trunk/src/main/java/org/jboss/cache/jmx/CacheNotificationBroadcaster.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/jmx/CacheNotificationBroadcaster.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/jmx/CacheNotificationBroadcaster.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -6,19 +6,19 @@
public interface CacheNotificationBroadcaster extends NotificationEmitter
{
// Notification Types
- public static final String
- NOTIF_CACHE_STARTED = "org.jboss.cache.CacheStarted",
- NOTIF_CACHE_STOPPED = "org.jboss.cache.CacheStopped",
- NOTIF_NODE_CREATED = "org.jboss.cache.NodeCreated",
- NOTIF_NODE_MODIFIED = "org.jboss.cache.NodeModified",
- NOTIF_NODE_REMOVED = "org.jboss.cache.NodeRemoved",
- NOTIF_NODE_MOVED = "org.jboss.cache.NodeMoved",
- NOTIF_NODE_VISITED = "org.jboss.cache.NodeVisited",
- NOTIF_NODE_EVICTED = "org.jboss.cache.NodeEvicted",
- NOTIF_NODE_LOADED = "org.jboss.cache.NodeLoaded",
- NOTIF_NODE_ACTIVATED = "org.jboss.cache.NodeActivated",
- NOTIF_NODE_PASSIVATED = "org.jboss.cache.NodePassivated",
- NOTIF_VIEW_CHANGED = "org.jboss.cache.ViewChanged";
+ String
+ NOTIF_CACHE_STARTED = "org.jboss.cache.CacheStarted",
+ NOTIF_CACHE_STOPPED = "org.jboss.cache.CacheStopped",
+ NOTIF_NODE_CREATED = "org.jboss.cache.NodeCreated",
+ NOTIF_NODE_MODIFIED = "org.jboss.cache.NodeModified",
+ NOTIF_NODE_REMOVED = "org.jboss.cache.NodeRemoved",
+ NOTIF_NODE_MOVED = "org.jboss.cache.NodeMoved",
+ NOTIF_NODE_VISITED = "org.jboss.cache.NodeVisited",
+ NOTIF_NODE_EVICTED = "org.jboss.cache.NodeEvicted",
+ NOTIF_NODE_LOADED = "org.jboss.cache.NodeLoaded",
+ NOTIF_NODE_ACTIVATED = "org.jboss.cache.NodeActivated",
+ NOTIF_NODE_PASSIVATED = "org.jboss.cache.NodePassivated",
+ NOTIF_VIEW_CHANGED = "org.jboss.cache.ViewChanged";
/**
* Sends a notification to any interested NotificationListener.
@@ -26,7 +26,7 @@
* @param notification the notification to send
*/
void sendNotification(Notification notification);
-
+
/**
* Gets the sequence number for the next notification.
*/
Modified: core/trunk/src/main/java/org/jboss/cache/lock/LockUtil.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/lock/LockUtil.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/lock/LockUtil.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -17,7 +17,7 @@
private static interface TransactionLockStatus extends Status
{
- public static final int STATUS_BROKEN = Integer.MIN_VALUE;
+ int STATUS_BROKEN = Integer.MIN_VALUE;
}
public static boolean breakTransactionLock(NodeLock lock,
Modified: core/trunk/src/main/java/org/jboss/cache/lock/NodeLock.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/lock/NodeLock.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/lock/NodeLock.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -11,7 +11,7 @@
*/
public interface NodeLock
{
- public enum LockType
+ enum LockType
{
NONE, READ, WRITE
}
Modified: core/trunk/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -329,7 +329,7 @@
}
- protected class ReaderLock extends LockBase implements Signaller, Lock
+ protected class ReaderLock extends LockBase implements Signaller
{
public void unlock()
@@ -397,7 +397,7 @@
}
- protected class WriterLock extends LockBase implements Signaller, Lock
+ protected class WriterLock extends LockBase implements Signaller
{
public void unlock()
Modified: core/trunk/src/main/java/org/jboss/cache/notifications/event/Event.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/notifications/event/Event.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/notifications/event/Event.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -10,7 +10,7 @@
*/
public interface Event
{
- public enum Type
+ enum Type
{
CACHE_STARTED, CACHE_STOPPED, CACHE_BLOCKED, CACHE_UNBLOCKED, NODE_ACTIVATED, NODE_PASSIVATED,
NODE_LOADED, NODE_EVICTED, NODE_CREATED, NODE_REMOVED, NODE_MODIFIED, NODE_MOVED, NODE_VISITED,
Modified: core/trunk/src/main/java/org/jboss/cache/optimistic/DataVersion.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/optimistic/DataVersion.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/optimistic/DataVersion.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -24,7 +24,7 @@
/**
* Returns true if this is a newer version than <code>other</code>. There is no guarantee that the DataVersion passed
* in is of the same implementation as the current instance. The implementation will have to check for this (if necessary)
- * and (if necessary) throw a {@link org.jboss.cache.optimistic.DataVersioningException}.
+ * and (if necessary) throw a {@link org.jboss.cache.optimistic.DataVersioningException}.
*/
- public boolean newerThan(DataVersion other);
+ boolean newerThan(DataVersion other);
}
Modified: core/trunk/src/main/java/org/jboss/cache/optimistic/TransactionWorkspace.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/optimistic/TransactionWorkspace.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/optimistic/TransactionWorkspace.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -28,45 +28,45 @@
/**
* @return Returns a map of {@link WorkspaceNode}s, keyed on {@link Fqn}
*/
- public Map<Fqn, WorkspaceNode<K, V>> getNodes();
+ Map<Fqn, WorkspaceNode<K, V>> getNodes();
/**
* @param nodes The nodes to set. Takes {@link WorkspaceNode}s.
*/
- public void setNodes(Map<Fqn, WorkspaceNode<K, V>> nodes);
+ void setNodes(Map<Fqn, WorkspaceNode<K, V>> nodes);
- public WorkspaceNode<K, V> getNode(Fqn fqn);
+ WorkspaceNode<K, V> getNode(Fqn fqn);
/**
* Is thread safe so you dont need to deal with synchronising access to this method.
*
* @param node
*/
- public void addNode(WorkspaceNode<K, V> node);
+ void addNode(WorkspaceNode<K, V> node);
/**
* Is thread safe so you dont need to deal with synchronising access to this method.
*/
- public WorkspaceNode<K, V> removeNode(Fqn fqn);
+ WorkspaceNode<K, V> removeNode(Fqn fqn);
/**
* Returns all nodes equal to or after the given node.
*/
- public SortedMap<Fqn, WorkspaceNode<K, V>> getNodesAfter(Fqn fqn);
+ SortedMap<Fqn, WorkspaceNode<K, V>> getNodesAfter(Fqn fqn);
/**
* Tests if versioning is implicit for a given tx.
* If set to true, the interceptor chain will handle versioning (implicit to JBossCache).
* If set to false, DataVersions will have to come from the caller.
*/
- public boolean isVersioningImplicit();
+ boolean isVersioningImplicit();
/**
* Sets if versioning is implicit for a given tx.
* If set to true, the interceptor chain will handle versioning (implicit to JBossCache).
* If set to false, DataVersions will have to come from the caller.
*/
- public void setVersioningImplicit(boolean versioningImplicit);
+ void setVersioningImplicit(boolean versioningImplicit);
/**
* returns true if the workspace contains a node with specified Fqn
Modified: core/trunk/src/main/java/org/jboss/cache/statetransfer/StateTransferGenerator.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/statetransfer/StateTransferGenerator.java 2008-04-28 16:10:49 UTC (rev 5729)
+++ core/trunk/src/main/java/org/jboss/cache/statetransfer/StateTransferGenerator.java 2008-04-28 16:16:56 UTC (rev 5730)
@@ -13,7 +13,7 @@
public interface StateTransferGenerator
{
- public void generateState(ObjectOutputStream stream, Node rootNode, boolean generateTransient,
- boolean generatePersistent, boolean suppressErrors) throws Throwable;
+ void generateState(ObjectOutputStream stream, Node rootNode, boolean generateTransient,
+ boolean generatePersistent, boolean suppressErrors) throws Throwable;
}
\ No newline at end of file
16 years, 8 months
JBoss Cache SVN: r5729 - in core/trunk/src/main/java/org/jboss/cache/commands: read and 3 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-28 12:10:49 -0400 (Mon, 28 Apr 2008)
New Revision: 5729
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/DataCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/ReversibleCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/VersionedDataCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/VisitableCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/AbstractDataCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/AnnounceBuddyPoolNameCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/AssignToBuddyGroupCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoveFromBuddyGroupCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java
Log:
Javadocs and refactoring
Modified: core/trunk/src/main/java/org/jboss/cache/commands/DataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/DataCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/DataCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -6,7 +6,8 @@
* Commands of this type manipulate data in the cache.
*
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
+ * @since 2.2.0
*/
public interface DataCommand extends VisitableCommand
{
Modified: core/trunk/src/main/java/org/jboss/cache/commands/ReversibleCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/ReversibleCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/ReversibleCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -3,9 +3,10 @@
import org.jboss.cache.transaction.GlobalTransaction;
/**
- * A reversible command is one that can be rolled back.
+ * A reversible command is one that can be rolled back. Also typically has a reference to a {@link org.jboss.cache.transaction.GlobalTransaction}.
*
* @author Mircea.Markus(a)jboss.com
+ * @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.2.0
*/
public interface ReversibleCommand extends DataCommand
@@ -15,7 +16,15 @@
*/
void rollback();
+ /**
+ * @return a GlobalTransaction associated with this command.
+ */
GlobalTransaction getGlobalTransaction();
+ /**
+ * Sets a GlobalTransaction on this command.
+ *
+ * @param gtx global transaction to set
+ */
void setGlobalTransaction(GlobalTransaction gtx);
}
Modified: core/trunk/src/main/java/org/jboss/cache/commands/VersionedDataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/VersionedDataCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/VersionedDataCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -3,9 +3,11 @@
import org.jboss.cache.optimistic.DataVersion;
/**
- * Just like a {@link org.jboss.cache.commands.DataCommand}, except that these are versioned. And reversible too.
+ * Just like a {@link org.jboss.cache.commands.DataCommand}, except that these are versioned and reversible too. Versioning
+ * is currently used by optimistic locking, and in future will be used by MVCC as well.
*
* @author Mircea.Markus(a)jboss.com
+ * @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.2.0
*/
public interface VersionedDataCommand extends ReversibleCommand
Modified: core/trunk/src/main/java/org/jboss/cache/commands/VisitableCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/VisitableCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/VisitableCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -3,7 +3,7 @@
import org.jboss.cache.InvocationContext;
/**
- * A type of command that can accept visitors, such as interceptors.
+ * A type of command that can accept {@link org.jboss.cache.commands.Visitor}s, such as {@link org.jboss.cache.interceptors.base.CommandInterceptor}s.
*
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.2.0
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/AbstractDataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/AbstractDataCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/AbstractDataCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -7,6 +7,8 @@
import org.jboss.cache.factories.annotations.Inject;
/**
+ * An abstract class providing basic functionality of all {@link DataCommand}s.
+ *
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.2.0
*/
@@ -43,7 +45,6 @@
fqn = (Fqn) args[0];
}
-
@Override
public boolean equals(Object o)
{
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -12,14 +12,14 @@
import java.util.Set;
/**
+ * This command retrieves the names of children for a specific Fqn, as defined by {@link org.jboss.cache.Node#getChildrenNames()}
+ * <p/>
+ * This is the equivalent of the old MethodCallDefinitions.getChildrenNamesMethodLocal method call from 2.1.x.
+ * <p/>
+ *
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
-/*
- equiv of old:
- 1 - getChildrenNamesMethodLocal_id
- */
-
public class GetChildrenNamesCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 23;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -9,15 +9,13 @@
/**
* Implements functionality defined by {@link org.jboss.cache.Cache#getData(org.jboss.cache.Fqn)}
+ * <p/>
+ * This is the equivalent of the old MethodCallDefinitions.getDataMapMethodLocal method call from 2.1.x.
+ * <p/>
*
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
-/*
- equiv of old:
- 1 - getDataMapMethodLocal_id
- */
-
public class GetDataMapCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 24;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -10,16 +10,14 @@
import org.jboss.cache.notifications.Notifier;
/**
- * Implements functionality defined by {@link org.jboss.cache.CacheSPI#get(String, Object)}
+ * Implements functionality defined by {@link org.jboss.cache.Cache#get(String, Object)}
+ * <p/>
+ * This is the equivalent of the old MethodCallDefinitions.getKeyValueMethodLocal method call from 2.1.x.
+ * <p/>
*
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
-/*
- equiv of old:
- 1 - getKeyValueMethodLocal_id
- */
-
public class GetKeyValueCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 26;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -10,15 +10,13 @@
/**
* Implements functionality defined by {@link org.jboss.cache.Cache#getKeys(org.jboss.cache.Fqn)}
+ * <p/>
+ * This is the equivalent of the old MethodCallDefinitions.getKeysMethodLocal method call from 2.1.x.
+ * <p/>
*
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
-/*
- equiv of old:
- 1 - getKeysMethodLocal_id
- */
-
public class GetKeysCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 25;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -6,15 +6,13 @@
/**
* Implements functionality defined by {@link org.jboss.cache.Cache#getNode(org.jboss.cache.Fqn)}
+ * <p/>
+ * This is the equivalent of the old MethodCallDefinitions.getNodeMethodLocal method call from 2.1.x.
+ * <p/>
*
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
-/*
- equiv of old:
- 1 - getNodeMethodLocal_id
- */
-
public class GetNodeCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 31;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -21,15 +21,14 @@
import java.util.TreeSet;
/**
- * Used with buddy replication's data gravitation interceptor. If marshalling is necessary, ensure that the cache is
- * configured to use {@link org.jboss.cache.config.Configuration#useRegionBasedMarshalling} and the {@link org.jboss.cache.Region}
- * pertaining to the Fqn passed in is activated, and has an appropriate ClassLoader.
+ * Used with buddy replication's {@link org.jboss.cache.interceptors.DataGravitatorInterceptor}.
+ * <p/>
+ * This is the equivalent of the old MethodCallDefinitions.dataGravitationMethod method call from 2.1.x.
+ * <p/>
+ *
+ * @author Manik Surtani
+ * @since 2.2.0
*/
-/*
- equiv of old:
- 1 - dataGravitationMethod_id
- */
-
public class GravitateDataCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 35;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -11,17 +11,15 @@
* not attempt to load nodes from a cache loader (may return false if a
* node has been evicted).
* <p/>
- * Specifically used by the {@link org.jboss.cache.loader.ClusteredCacheLoader} to implement {@link org.jboss.cache.loader.CacheLoader#exists(org.jboss.cache.Fqn)}
+ * Specifically used by the {@link org.jboss.cache.loader.ClusteredCacheLoader} to
+ * implement {@link org.jboss.cache.loader.CacheLoader#exists(org.jboss.cache.Fqn)}
* <p/>
+ * This is the equivalent of the old MethodCallDefinitions.existsMethod method call from 2.1.x.
+ * <p/>
*
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
-/*
- equiv of old:
- 1 - existsMethod_id
- */
-
public class RemoteExistsCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 16;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/AnnounceBuddyPoolNameCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/AnnounceBuddyPoolNameCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/AnnounceBuddyPoolNameCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -8,8 +8,12 @@
import org.jgroups.Address;
/**
+ * Announces a buddy pool name to the cluster. This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
+ * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * <p/>
+ *
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
public class AnnounceBuddyPoolNameCommand extends AbstractReplicableCommand
{
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/AssignToBuddyGroupCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/AssignToBuddyGroupCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/AssignToBuddyGroupCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -10,8 +10,12 @@
import java.util.Map;
/**
+ * Assigns a buddy to a group. This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
+ * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * <p/>
+ *
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
public class AssignToBuddyGroupCommand extends AbstractReplicableCommand
{
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -16,8 +16,13 @@
import java.util.List;
/**
+ * Issues a clustered get call, for use primarily by the {@link org.jboss.cache.loader.ClusteredCacheLoader}. This is
+ * not a {@link org.jboss.cache.commands.VisitableCommand} and hence
+ * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * <p/>
+ *
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @since 2.2.0
*/
public class ClusteredGetCommand extends AbstractReplicableCommand
{
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -19,7 +19,10 @@
import java.util.List;
/**
- * Data gravitation cleanup handler.
+ * Data gravitation cleanup handler. Primarily used by the {@link org.jboss.cache.interceptors.DataGravitatorInterceptor}.
+ * This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
+ * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * <p/>
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoveFromBuddyGroupCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoveFromBuddyGroupCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoveFromBuddyGroupCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -5,6 +5,10 @@
import org.jboss.cache.factories.annotations.Inject;
/**
+ * Removes a buddy from a group. This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
+ * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * <p/>
+ *
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -13,7 +13,12 @@
import java.util.List;
/**
- * Command that implements cluster replication logic.
+ * Command that implements cluster replication logic. Essentially mimics the replicate() and replicateAll() methods
+ * in 2.1.x, we may need to revisit the usefulness of such a command.
+ * <p/>
+ * This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
+ * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * <p/>
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -5,13 +5,11 @@
import org.jboss.cache.transaction.GlobalTransaction;
/**
+ * Represents a commit() call, the 2nd part of a 2-phase commit.
+ *
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- commitMethod_id
- */
-
public class CommitCommand extends AbstractTransactionCommand
{
public static final int METHOD_ID = 11;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -10,13 +10,11 @@
import java.util.Map;
/**
+ * An optimistic version of {@link PrepareCommand}.
+ *
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- optimisticPrepareMethod_id
- */
-
public class OptimisticPrepareCommand extends PrepareCommand
{
public static final int METHOD_ID = 18;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -9,15 +9,11 @@
import java.util.List;
/**
- * Marker for a cache command action.
+ * The prepare phase of a 2-phase commit, or the single prepare/commit phase of a single-phase commit.
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- prepareMethod_id
- */
-
public class PrepareCommand extends AbstractTransactionCommand
{
public static final int METHOD_ID = 10;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -5,13 +5,11 @@
import org.jboss.cache.transaction.GlobalTransaction;
/**
+ * The rollback phase of a 2-phase commit.
+ *
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- rollbackMethod_id
- */
-
public class RollbackCommand extends AbstractTransactionCommand
{
public static final int METHOD_ID = 12;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -8,17 +8,11 @@
import java.util.List;
/**
- * Implements functionality defined by {@link org.jboss.cache.CacheSPI#evict(org.jboss.cache.Fqn)}
+ * Implements functionality defined by {@link org.jboss.cache.Cache#evict(org.jboss.cache.Fqn)}
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- equiv of old:
- 1 - evictNodeMethodLocal_id
- 2 - evictVersionedNodeMethodLocal_id
- */
-
public class EvictCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 8;
@@ -34,7 +28,7 @@
/**
* Returns false if the node still exists; i.e. was only data removed because it still has children.
*
- * @see org.jboss.cache.interceptors.EvictionInterceptor#handleEvictFqnCommand(org.jboss.cache.InvocationContext, EvictCommand)
+ * @see org.jboss.cache.interceptors.EvictionInterceptor#visitEvictFqnCommand(org.jboss.cache.InvocationContext, EvictCommand)
* there is wehere this attribute is used
*/
public Object perform(InvocationContext ctx)
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -32,11 +32,6 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- equiv of old:
- 1 - invalidateMethodLocal_id
- */
-
public class InvalidateCommand extends EvictCommand
{
public static final int METHOD_ID = 47;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -17,11 +17,6 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- equiv of old:
- 1 - moveMethodLocal_id
- */
-
public class MoveCommand extends AbstractDataCommand implements ReversibleCommand
{
public static final int METHOD_ID = 36;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -15,19 +15,11 @@
import java.util.Map;
/**
- * Implements functionality defined by {@link org.jboss.cache.CacheSPI#put(String, java.util.Map)}
+ * Implements functionality defined by {@link org.jboss.cache.Cache#put(String, java.util.Map)}.
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- equiv of old:
- 1 - putDataEraseMethodLocal_id
- 2 - putDataMethodLocal_id
- 3 - putDataEraseVersionedMethodLocal_id
- 4 - putDataVersionedMethodLocal_id
- */
-
public class PutDataMapCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 1;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -15,20 +15,12 @@
import java.util.Map;
/**
- * Implements functionality defined by {@link org.jboss.cache.CacheSPI#put(org.jboss.cache.Fqn, Object, Object)}.
+ * Implements functionality defined by {@link org.jboss.cache.Cache#put(org.jboss.cache.Fqn, Object, Object)}. Also implements
+ * {@link org.jboss.cache.Cache#putForExternalRead(org.jboss.cache.Fqn, Object, Object)} if {@link #isPutForExternalRead()} is true.
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-
-/*
- equiv of old:
- 1 - putKeyValMethodLocal_id
- 2 - putKeyValVersionedMethodLocal_id
- 3 - putForExternalReadMethodLocal_id
- 4 - putForExternalReadVersionedMethodLocal_id
- */
-
public class PutKeyValueCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 3;
@@ -43,7 +35,7 @@
private Object key;
private Object value;
private boolean createUndoOps;
- private boolean isPutForExternalRead;
+ private boolean putForExternalRead;
private Object oldValue;
public PutKeyValueCommand()
@@ -51,7 +43,7 @@
trace = log.isTraceEnabled();
}
- public PutKeyValueCommand(GlobalTransaction gtx, Fqn fqn, Object key, Object value, boolean createUndoOps, boolean isPutForExternalRead)
+ public PutKeyValueCommand(GlobalTransaction gtx, Fqn fqn, Object key, Object value, boolean createUndoOps, boolean putForExternalRead)
{
this();
this.globalTransaction = gtx;
@@ -59,7 +51,7 @@
this.key = key;
this.value = value;
this.createUndoOps = createUndoOps;
- this.isPutForExternalRead = isPutForExternalRead;
+ this.putForExternalRead = putForExternalRead;
}
public Object perform(InvocationContext ctx)
@@ -105,7 +97,7 @@
public boolean isPutForExternalRead()
{
- return isPutForExternalRead;
+ return putForExternalRead;
}
public Object getKey()
@@ -137,11 +129,11 @@
{
if (isVersioned())
{
- return isPutForExternalRead ? PUT_FOR_EXT_READ_VERSIONED_METHOD_ID : VERSIONED_METHOD_ID;
+ return putForExternalRead ? PUT_FOR_EXT_READ_VERSIONED_METHOD_ID : VERSIONED_METHOD_ID;
}
else
{
- return isPutForExternalRead ? PUT_FOR_EXT_READ_METHOD_ID : METHOD_ID;
+ return putForExternalRead ? PUT_FOR_EXT_READ_METHOD_ID : METHOD_ID;
}
}
@@ -162,7 +154,7 @@
key = args[2];
value = args[3];
createUndoOps = (Boolean) args[4];
- isPutForExternalRead = (commandId == PUT_FOR_EXT_READ_METHOD_ID || commandId == PUT_FOR_EXT_READ_VERSIONED_METHOD_ID);
+ putForExternalRead = (commandId == PUT_FOR_EXT_READ_METHOD_ID || commandId == PUT_FOR_EXT_READ_VERSIONED_METHOD_ID);
if (isVersionedId(commandId)) dataVersion = (DataVersion) args[5];
}
@@ -176,7 +168,7 @@
PutKeyValueCommand that = (PutKeyValueCommand) o;
if (createUndoOps != that.createUndoOps) return false;
- if (isPutForExternalRead != that.isPutForExternalRead) return false;
+ if (putForExternalRead != that.putForExternalRead) return false;
if (globalTransaction != null ? !globalTransaction.equals(that.globalTransaction) : that.globalTransaction != null)
return false;
if (key != null ? !key.equals(that.key) : that.key != null) return false;
@@ -193,7 +185,7 @@
result = 31 * result + (key != null ? key.hashCode() : 0);
result = 31 * result + (value != null ? value.hashCode() : 0);
result = 31 * result + (createUndoOps ? 1 : 0);
- result = 31 * result + (isPutForExternalRead ? 1 : 0);
+ result = 31 * result + (putForExternalRead ? 1 : 0);
return result;
}
@@ -213,7 +205,7 @@
", key=" + key +
", value=" + value +
", createUndoOps=" + createUndoOps +
- ", isPutForExternalRead=" + isPutForExternalRead +
+ ", isPutForExternalRead=" + putForExternalRead +
", oldValue=" + oldValue +
'}';
}
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -19,12 +19,6 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- equiv of old:
- 1 - removeDataMethodLocal_id
- 2 - removeDataVersionedMethodLocal_id
- */
-
public class RemoveDataCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 7;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -19,12 +19,6 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- equiv of old:
- 1 - removeKeyMethodLocal_id
- 1 - removeKeyVersionedMethodLocal_id
- */
-
public class RemoveKeyCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 6;
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java 2008-04-28 16:10:49 UTC (rev 5729)
@@ -18,12 +18,6 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
-/*
- equiv of old:
- 1 - removeNodeMethodLocal_id
- 2 - removeNodeVersionedMethodLocal_id
- */
-
public class RemoveNodeCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 5;
16 years, 8 months
JBoss Cache SVN: r5728 - in core/trunk/src: main/java/org/jboss/cache/commands and 6 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-28 11:46:50 -0400 (Mon, 28 Apr 2008)
New Revision: 5728
Modified:
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyFqnTransformer.java
core/trunk/src/main/java/org/jboss/cache/commands/AbstractVisitor.java
core/trunk/src/main/java/org/jboss/cache/commands/Visitor.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/CreateNodeCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java
core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java
core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java
Log:
Javadocs and refactoring
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyFqnTransformer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyFqnTransformer.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyFqnTransformer.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -62,13 +62,13 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand commitCommand) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand commitCommand) throws Throwable
{
return commitCommand;
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildPutDataMapCommand(null, transformed, command.getData(),
@@ -76,7 +76,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildPutKeyValueCommand(null, transformed, command.getKey(),
@@ -84,7 +84,7 @@
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildRemoveNodeCommand(command.getGlobalTransaction(), transformed, command.isEviction(),
@@ -92,7 +92,7 @@
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildRemoveDataCommand(command.getGlobalTransaction(), transformed, command.isCreateUndoops(),
@@ -100,70 +100,70 @@
}
@Override
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
+ public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
Fqn fqn = getBackupFqn(command.getFqn());
return factory.buildEvictFqnCommand(fqn);
}
@Override
- public Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
+ public Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildInvalidateCommand(transformed);
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildRemoveKeyCommand(null, transformed, command.getKey(), command.isCreateUndoOps());
}
@Override
- public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildGetDataMapCommand(transformed);
}
@Override
- public Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildEvictFqnCommand(transformed);
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildGetKeyValueCommand(transformed, command.getKey(), command.isSendNodeEvent());
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildGetNodeCommand(transformed);
}
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildGetKeysCommand(transformed);
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildGetChildrenNamesCommand(transformed);
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
Fqn transformedFrom = getBackupFqn(command.getFqn());
Fqn transformedTo = getBackupFqn(command.getTo());
@@ -171,14 +171,14 @@
}
@Override
- public Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
+ public Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildGravitateDataCacheCommand(transformed, command.isSearchSubtrees());
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
List<ReversibleCommand> toTransform = command.getModifications();
List<ReversibleCommand> transformedCommands = transformBatch(toTransform);
@@ -186,20 +186,20 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
return factory.buildRollbackCommand(null);
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
List<ReversibleCommand> transformed = transformBatch(command.getModifications());
return factory.buildOptimisticPrepareCommand(command.getGlobalTransaction(), transformed, command.getData(), command.getLocalAddress(), command.isOnePhaseCommit());
}
@Override
- public Object handleCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable
+ public Object visitCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable
{
return factory.buildCreateNodeCommand(getBackupFqn(command.getFqn()));
}
Modified: core/trunk/src/main/java/org/jboss/cache/commands/AbstractVisitor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/AbstractVisitor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/AbstractVisitor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -25,116 +25,135 @@
import java.util.Collection;
/**
+ * An abstract implementation of a Visitor that delegates all visit calls to a default handler which can be overridden.
+ *
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @author Manik Surtani
+ * @since 2.2.0
*/
public abstract class AbstractVisitor implements Visitor
{
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
+ public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
+ public Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
+ public Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable
+ public Object visitCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
- public Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable
+ /**
+ * A default handler for all commands visited. This is called for any visit method called, unless a visit command is
+ * appropriately overridden.
+ *
+ * @param ctx invocation context
+ * @param command command to handle
+ * @return return value
+ * @throws Throwable in the case of a problem
+ */
+ protected Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable
{
return null;
}
+ /**
+ * Helper method to visit a collection of VisitableCommands.
+ *
+ * @param ctx Invocation context
+ * @param toVisit collection of commands to visit
+ * @throws Throwable in the event of problems
+ */
public void visitCollection(InvocationContext ctx, Collection<? extends VisitableCommand> toVisit) throws Throwable
{
for (VisitableCommand command : toVisit)
Modified: core/trunk/src/main/java/org/jboss/cache/commands/Visitor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/Visitor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/Visitor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -23,133 +23,214 @@
import org.jboss.cache.commands.write.RemoveNodeCommand;
/**
+ * This interface is the core of JBoss Cache, where each {@link VisitableCommand} can be visited by a Visitor implementation.
+ * Visitors which are accepted by the {@link org.jboss.cache.commands.VisitableCommand} are able to modify the command
+ * based on any logic encapsulated by the visitor.
+ *
* @author Mircea.Markus(a)jboss.com
- * @since 2.2
+ * @author Manik Surtani
+ * @since 2.2.0
*/
public interface Visitor
{
+ /**
+ * Visits a PutDataMapCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
+ */
+ Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - putDataEraseMethodLocal_id
- 2 - putDataMethodLocal_id
- 3 - putDataEraseVersionedMethodLocal_id
- 4 - putDataVersionedMethodLocal_id
- */
-
- Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable;
-
- /*
- equiv of old:
- 1 - putKeyValMethodLocal_id
- 2 - putKeyValVersionedMethodLocal_id
- 3 - putForExternalReadMethodLocal_id
- 4 - putForExternalReadVersionedMethodLocal_id
+ /**
+ * Visits a PutKeyValueCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand putKeyValueCommand) throws Throwable;
+ Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - removeNodeMethodLocal_id
- 2 - removeNodeVersionedMethodLocal_id
+ /**
+ * Visits a RemoveNodeCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand removeNodeCommand) throws Throwable;
+ Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - removeDataMethodLocal_id
- 2 - removeDataVersionedMethodLocal_id
+ /**
+ * Visits a RemoveDataCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand removeDataCommand) throws Throwable;
+ Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - evictNodeMethodLocal_id
- 2 - evictVersionedNodeMethodLocal_id
+ /**
+ * Visits a EvictCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand evictFqnCommand) throws Throwable;
+ Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - invalidateMethodLocal_id
+ /**
+ * Visits a InvalidateCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand invalidateCommand) throws Throwable;
+ Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - removeKeyMethodLocal_id
- 1 - removeKeyVersionedMethodLocal_id
+ /**
+ * Visits a RemoveKeyCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand removeKeyCommand) throws Throwable;
+ Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - getDataMapMethodLocal_id
+ /**
+ * Visits a GetDataMapCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand getDataMapCommand) throws Throwable;
+ Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - existsMethod_id
+ /**
+ * Visits a RemoteExistsCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand existsNodeCommand) throws Throwable;
+ Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - getKeyValueMethodLocal_id
+ /**
+ * Visits a GetKeyValueCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand getKeyValueCommand) throws Throwable;
+ Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - getNodeMethodLocal_id
+ /**
+ * Visits a GetNodeCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand getNodeCommand) throws Throwable;
+ Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - getKeysMethodLocal_id
+ /**
+ * Visits a GetKeysCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand getKeysCommand) throws Throwable;
+ Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - getChildrenNamesMethodLocal_id
+ /**
+ * Visits a GetChildrenNamesCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand getChildrenNamesCacheCommand) throws Throwable;
+ Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - moveMethodLocal_id
+ /**
+ * Visits a MoveCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleMoveCommand(InvocationContext ctx, MoveCommand moveCommand) throws Throwable;
+ Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable;
- /*
- equiv of old:
- 1 - dataGravitationMethod_id
+ /**
+ * Visits a GravitateDataCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand gravitateDataCommand) throws Throwable;
+ Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable;
- /*
- prepareMethod_id
+ /**
+ * Visits a PrepareCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handlePrepareCommand(InvocationContext ctx, PrepareCommand prepareCommand) throws Throwable;
+ Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable;
- /*
- rollbackMethod_id
+ /**
+ * Visits a RollbackCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleRollbackCommand(InvocationContext ctx, RollbackCommand rollbackCommand) throws Throwable;
+ Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable;
- /*
- commitMethod_id
+ /**
+ * Visits a CommitCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleCommitCommand(InvocationContext ctx, CommitCommand commitCommand) throws Throwable;
+ Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable;
- /*
- optimisticPrepareMethod_id
+ /**
+ * Visits a OptimisticPrepareCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
*/
- Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand optimisticPrepareCommand) throws Throwable;
+ Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable;
- Object handleCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable;
+ /**
+ * Visits a CreateNodeCommand.
+ *
+ * @param ctx invocation context
+ * @param command command to visit
+ * @return response from the visit
+ * @throws Throwable in the event of problems.
+ */
+ Object visitCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable;
}
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -15,6 +15,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - getChildrenNamesMethodLocal_id
+ */
+
public class GetChildrenNamesCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 23;
@@ -52,7 +57,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleGetChildrenNamesCommand(ctx, this);
+ return visitor.visitGetChildrenNamesCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -13,6 +13,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - getDataMapMethodLocal_id
+ */
+
public class GetDataMapCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 24;
@@ -35,7 +40,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleGetDataMapCommand(ctx, this);
+ return visitor.visitGetDataMapCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -15,6 +15,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - getKeyValueMethodLocal_id
+ */
+
public class GetKeyValueCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 26;
@@ -65,7 +70,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleGetKeyValueCommand(ctx, this);
+ return visitor.visitGetKeyValueCommand(ctx, this);
}
public Object getKey()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -14,6 +14,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - getKeysMethodLocal_id
+ */
+
public class GetKeysCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 25;
@@ -40,7 +45,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleGetKeysCommand(ctx, this);
+ return visitor.visitGetKeysCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -10,6 +10,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - getNodeMethodLocal_id
+ */
+
public class GetNodeCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 31;
@@ -30,7 +35,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleGetNodeCommand(ctx, this);
+ return visitor.visitGetNodeCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -25,6 +25,11 @@
* configured to use {@link org.jboss.cache.config.Configuration#useRegionBasedMarshalling} and the {@link org.jboss.cache.Region}
* pertaining to the Fqn passed in is activated, and has an appropriate ClassLoader.
*/
+/*
+ equiv of old:
+ 1 - dataGravitationMethod_id
+ */
+
public class GravitateDataCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 35;
@@ -161,7 +166,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleGravitateDataCommand(ctx, this);
+ return visitor.visitGravitateDataCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -17,6 +17,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - existsMethod_id
+ */
+
public class RemoteExistsCommand extends AbstractDataCommand
{
public static final int METHOD_ID = 16;
@@ -38,7 +43,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleExistsNodeCommand(ctx, this);
+ return visitor.visitExistsNodeCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/CommitCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -8,6 +8,10 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ commitMethod_id
+ */
+
public class CommitCommand extends AbstractTransactionCommand
{
public static final int METHOD_ID = 11;
@@ -23,7 +27,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleCommitCommand(ctx, this);
+ return visitor.visitCommitCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/OptimisticPrepareCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -13,6 +13,10 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ optimisticPrepareMethod_id
+ */
+
public class OptimisticPrepareCommand extends PrepareCommand
{
public static final int METHOD_ID = 18;
@@ -31,7 +35,7 @@
@Override
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleOptimisticPrepareCommand(ctx, this);
+ return visitor.visitOptimisticPrepareCommand(ctx, this);
}
public Map getData()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/PrepareCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -14,6 +14,10 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ prepareMethod_id
+ */
+
public class PrepareCommand extends AbstractTransactionCommand
{
public static final int METHOD_ID = 10;
@@ -36,7 +40,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handlePrepareCommand(ctx, this);
+ return visitor.visitPrepareCommand(ctx, this);
}
public List<ReversibleCommand> getModifications()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/RollbackCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -8,6 +8,10 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ rollbackMethod_id
+ */
+
public class RollbackCommand extends AbstractTransactionCommand
{
public static final int METHOD_ID = 12;
@@ -23,7 +27,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleRollbackCommand(ctx, this);
+ return visitor.visitRollbackCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/CreateNodeCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/CreateNodeCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/CreateNodeCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -68,7 +68,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleCreateNodeCommand(ctx, this);
+ return visitor.visitCreateNodeCommand(ctx, this);
}
public void rollback()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -13,6 +13,12 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - evictNodeMethodLocal_id
+ 2 - evictVersionedNodeMethodLocal_id
+ */
+
public class EvictCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 8;
@@ -27,9 +33,10 @@
/**
* Returns false if the node still exists; i.e. was only data removed because it still has children.
+ *
* @see org.jboss.cache.interceptors.EvictionInterceptor#handleEvictFqnCommand(org.jboss.cache.InvocationContext, EvictCommand)
- * there is wehere this attribute is used
- */
+ * there is wehere this attribute is used
+ */
public Object perform(InvocationContext ctx)
{
NodeSPI node = dataContainer.peek(fqn, false);
@@ -60,7 +67,8 @@
try
{
return dataContainer.evict(fqn);
- } finally
+ }
+ finally
{
notifier.notifyNodeEvicted(fqn, false, ctx);
}
@@ -68,7 +76,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleEvictFqnCommand(ctx, this);
+ return visitor.visitEvictFqnCommand(ctx, this);
}
public int getCommandId()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -32,6 +32,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - invalidateMethodLocal_id
+ */
+
public class InvalidateCommand extends EvictCommand
{
public static final int METHOD_ID = 47;
@@ -155,7 +160,7 @@
@Override
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleInvalidateCommand(ctx, this);
+ return visitor.visitInvalidateCommand(ctx, this);
}
@Override
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -17,6 +17,11 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - moveMethodLocal_id
+ */
+
public class MoveCommand extends AbstractDataCommand implements ReversibleCommand
{
public static final int METHOD_ID = 36;
@@ -72,7 +77,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleMoveCommand(ctx, this);
+ return visitor.visitMoveCommand(ctx, this);
}
public void _move(Fqn nodeToMoveFqn, Fqn newParentFqn, boolean skipNotifications, InvocationContext ctx)
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -20,6 +20,14 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - putDataEraseMethodLocal_id
+ 2 - putDataMethodLocal_id
+ 3 - putDataEraseVersionedMethodLocal_id
+ 4 - putDataVersionedMethodLocal_id
+ */
+
public class PutDataMapCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 1;
@@ -86,7 +94,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handlePutDataMapCommand(ctx, this);
+ return visitor.visitPutDataMapCommand(ctx, this);
}
public Map getData()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -20,6 +20,15 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+
+/*
+ equiv of old:
+ 1 - putKeyValMethodLocal_id
+ 2 - putKeyValVersionedMethodLocal_id
+ 3 - putForExternalReadMethodLocal_id
+ 4 - putForExternalReadVersionedMethodLocal_id
+ */
+
public class PutKeyValueCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 3;
@@ -91,7 +100,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handlePutKeyValueCommand(ctx, this);
+ return visitor.visitPutKeyValueCommand(ctx, this);
}
public boolean isPutForExternalRead()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -19,6 +19,12 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - removeDataMethodLocal_id
+ 2 - removeDataVersionedMethodLocal_id
+ */
+
public class RemoveDataCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 7;
@@ -120,7 +126,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleRemoveDataCommand(ctx, this);
+ return visitor.visitRemoveDataCommand(ctx, this);
}
public boolean isEviction()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -19,6 +19,12 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - removeKeyMethodLocal_id
+ 1 - removeKeyVersionedMethodLocal_id
+ */
+
public class RemoveKeyCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 6;
@@ -73,7 +79,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleRemoveKeyCommand(ctx, this);
+ return visitor.visitRemoveKeyCommand(ctx, this);
}
public Object getKey()
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -18,6 +18,12 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+/*
+ equiv of old:
+ 1 - removeNodeMethodLocal_id
+ 2 - removeNodeVersionedMethodLocal_id
+ */
+
public class RemoveNodeCommand extends AbstractVersionedDataCommand
{
public static final int METHOD_ID = 5;
@@ -161,7 +167,7 @@
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
{
- return visitor.handleRemoveNodeCommand(ctx, this);
+ return visitor.visitRemoveNodeCommand(ctx, this);
}
public boolean isSkipSendingNodeEvents()
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -71,9 +71,9 @@
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
- Object returnValue = super.handleRemoveDataCommand(ctx, command);
+ Object returnValue = super.visitRemoveDataCommand(ctx, command);
if (trace)
log.trace("This is a remove data operation; removing the data from the loader, no activation processing needed.");
loader.removeData(command.getFqn());
@@ -81,9 +81,9 @@
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
- Object returnValue = super.handleRemoveNodeCommand(ctx, command);
+ Object returnValue = super.visitRemoveNodeCommand(ctx, command);
if (trace)
log.trace("This is a remove operation; removing the node from the loader, no activation processing needed.");
loader.remove(command.getFqn());
@@ -91,57 +91,57 @@
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
- Object returnValue = super.handleGetChildrenNamesCommand(ctx, command);
+ Object returnValue = super.visitGetChildrenNamesCommand(ctx, command);
removeNodeFromCacheLoader(ctx, command.getFqn());
return returnValue;
}
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
- Object returnValue = super.handleGetKeysCommand(ctx, command);
+ Object returnValue = super.visitGetKeysCommand(ctx, command);
removeNodeFromCacheLoader(ctx, command.getFqn());
return returnValue;
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
- Object returnValue = super.handleGetNodeCommand(ctx, command);
+ Object returnValue = super.visitGetNodeCommand(ctx, command);
removeNodeFromCacheLoader(ctx, command.getFqn());
return returnValue;
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
- Object returnValue = super.handleGetKeyValueCommand(ctx, command);
+ Object returnValue = super.visitGetKeyValueCommand(ctx, command);
removeNodeFromCacheLoader(ctx, command.getFqn());
return returnValue;
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
- Object returnValue = super.handlePutKeyValueCommand(ctx, command);
+ Object returnValue = super.visitPutKeyValueCommand(ctx, command);
removeNodeFromCacheLoader(ctx, command.getFqn());
return returnValue;
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
- Object returnValue = super.handlePutDataMapCommand(ctx, command);
+ Object returnValue = super.visitPutDataMapCommand(ctx, command);
removeNodeFromCacheLoader(ctx, command.getFqn());
return returnValue;
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
- Object returnValue = super.handleRemoveKeyCommand(ctx, command);
+ Object returnValue = super.visitRemoveKeyCommand(ctx, command);
removeNodeFromCacheLoader(ctx, command.getFqn());
return returnValue;
}
@@ -193,7 +193,7 @@
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
if (inTransaction())
@@ -209,7 +209,7 @@
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
if (inTransaction())
@@ -295,7 +295,7 @@
private int txActs = 0;
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand removeNodeCommand) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand removeNodeCommand) throws Throwable
{
Modification mod = new Modification(Modification.ModificationType.REMOVE_NODE, removeNodeCommand.getFqn());
cacheLoaderModifications.add(mod);
@@ -303,7 +303,7 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
Fqn fqn = command.getFqn();
handlePutCommand(ctx, fqn);
@@ -344,9 +344,9 @@
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand putKeyValueCommand) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand putKeyValueCommand) throws Throwable
{
- return super.handlePutKeyValueCommand(ctx, putKeyValueCommand);
+ return super.visitPutKeyValueCommand(ctx, putKeyValueCommand);
}
private boolean loaderNoChildren(Fqn fqn) throws Exception
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -90,7 +90,7 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
if (command.getFqn() != null)
{
@@ -100,7 +100,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
if (command.getFqn() != null)
{
@@ -110,7 +110,7 @@
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
if (command.getFqn() != null)
{
@@ -124,7 +124,7 @@
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
if (command.getFqn() != null)
{
@@ -135,7 +135,7 @@
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
if (command.getFqn() != null)
{
@@ -145,7 +145,7 @@
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
Fqn fqn = command.getFqn();
if (fqn != null)
@@ -159,7 +159,7 @@
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
if (command.getFqn() != null)
{
@@ -169,7 +169,7 @@
}
@Override
- public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
if (command.getFqn() != null)
{
@@ -179,7 +179,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
// clean up nodesCreated map
if (trace) log.trace("Removing temporarily created nodes from treecache");
@@ -206,7 +206,7 @@
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
if (config.isNodeLockingOptimistic() && command.getFqn() != null)
{
@@ -216,7 +216,7 @@
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
if (command.getFqn() != null && !useCacheStore)
{
@@ -226,7 +226,7 @@
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
Fqn fqn = command.getFqn();
if (fqn != null && !useCacheStore)
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -60,7 +60,7 @@
}
@Override
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
+ public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
Object returnValue = invokeNextInterceptor(ctx, command);
m_evictions++;
@@ -68,7 +68,7 @@
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
long t1 = System.currentTimeMillis();
Object retval = invokeNextInterceptor(ctx, command);
@@ -87,7 +87,7 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
Map data = command.getData();
long t1 = System.currentTimeMillis();
@@ -104,7 +104,7 @@
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
long t1 = System.currentTimeMillis();
Object retval = invokeNextInterceptor(ctx, command);
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -406,7 +406,7 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
if (generateStatistics) putCount++;
if (command.isEraseContents())
@@ -422,7 +422,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
if (generateStatistics) putCount++;
modifications.add(new Modification(Modification.ModificationType.PUT_KEY_VALUE, command.getFqn(),
@@ -432,7 +432,7 @@
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
modifications.add(new Modification(Modification.ModificationType.REMOVE_KEY_VALUE, command.getFqn(), command.getKey()));
affectedFqns.add(command.getFqn());
@@ -440,7 +440,7 @@
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
modifications.add(new Modification(Modification.ModificationType.REMOVE_DATA, command.getFqn()));
affectedFqns.add(command.getFqn());
@@ -448,7 +448,7 @@
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
modifications.add(new Modification(Modification.ModificationType.REMOVE_NODE, command.getFqn()));
affectedFqns.add(command.getFqn());
@@ -456,7 +456,7 @@
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
Fqn moveFrom = command.getFqn();
affectedFqns.add(command.getFqn());
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -60,28 +60,28 @@
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
if (trace) log.trace("Suppressing invocation of method handlePrepareCommand.");
return null;
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
if (trace) log.trace("Suppressing invocation of method handleOptimisticPrepareCommand.");
return null;
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
if (trace) log.trace("Suppressing invocation of method handleCommitCommand.");
return null;
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
if (trace) log.trace("Suppressing invocation of method handleRollbackCommand.");
return null;
@@ -115,37 +115,37 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return handleAlterCacheMethod(ctx, command);
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
return handleAlterCacheMethod(ctx, command);
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return handleAlterCacheMethod(ctx, command);
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
return handleAlterCacheMethod(ctx, command);
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
return handleAlterCacheMethod(ctx, command);
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
return handleAlterCacheMethod(ctx, command);
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -95,43 +95,43 @@
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
return handleGetMethod(ctx, command);
}
@Override
- public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
return handleGetMethod(ctx, command);
}
@Override
- public Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
{
return handleGetMethod(ctx, command);
}
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
return handleGetMethod(ctx, command);
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
return handleGetMethod(ctx, command);
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
return handleGetMethod(ctx, command);
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
try
{
@@ -144,7 +144,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
GlobalTransaction gtx = ctx.getGlobalTransaction();
try
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -60,7 +60,7 @@
}
@Override
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
+ public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
Fqn fqn = command.getFqn();
Object retVal = invokeNextInterceptor(ctx, command);
@@ -80,7 +80,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
Region r;
@@ -92,7 +92,7 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
Fqn fqn = command.getFqn();
@@ -122,7 +122,7 @@
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
if (retVal == null)
@@ -146,7 +146,7 @@
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
return handleGetNodeOrDataCommands(ctx, retVal, command.getFqn());
@@ -173,14 +173,14 @@
}
@Override
- public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
return handleGetNodeOrDataCommands(ctx, retVal, command.getFqn());
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
Fqn fqn = command.getFqn();
@@ -200,7 +200,7 @@
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
Region r;
@@ -212,7 +212,7 @@
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
Region r;
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -100,44 +100,44 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return handleWriteMethod(ctx, command.getFqn(), null, command);
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
if (command.isPutForExternalRead()) return invokeNextInterceptor(ctx, command);
return handleWriteMethod(ctx, command.getFqn(), null, command);
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return handleWriteMethod(ctx, command.getFqn(), null, command);
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
return handleWriteMethod(ctx, command.getFqn(), null, command);
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
return handleWriteMethod(ctx, command.getTo(), command.getFqn(), command);
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
return handleWriteMethod(ctx, command.getFqn(), null, command);
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
Transaction tx = ctx.getTransaction();
@@ -162,7 +162,7 @@
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
Transaction tx = ctx.getTransaction();
@@ -182,7 +182,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
Transaction tx = ctx.getTransaction();
@@ -197,7 +197,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
Transaction tx = ctx.getTransaction();
@@ -290,7 +290,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
if (command.isPutForExternalRead())
{
@@ -302,31 +302,31 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return addFqn(command.getFqn());
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return addFqn(command.getFqn());
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
return addFqn(command.getFqn());
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
return addFqn(command.getFqn());
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
if (containsPutForExternalRead) return null;
result.add(command.getFqn());
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -44,55 +44,55 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction());
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -38,7 +38,7 @@
{
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
if (command.getDataVersion() != null)
{
@@ -51,7 +51,7 @@
}
@Override
- public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
if (retVal instanceof Map)
@@ -64,7 +64,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
Set<MarshalledValue> marshalledValues = new HashSet<MarshalledValue>();
if (!MarshalledValueHelper.isTypeExcluded(command.getKey().getClass()))
@@ -82,21 +82,21 @@
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
return processRetVal(retVal);
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
return processRetVal(retVal);
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
Set<MarshalledValue> marshalledValues = new HashSet<MarshalledValue>();
if (!MarshalledValueHelper.isTypeExcluded(command.getKey().getClass()))
@@ -109,21 +109,21 @@
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
return processRetVal(retVal);
}
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
return processRetVal(retVal);
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
Set<MarshalledValue> marshalledValues = new HashSet<MarshalledValue>();
if (!MarshalledValueHelper.isTypeExcluded(command.getKey().getClass()))
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/NotificationInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -26,7 +26,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
notifier.notifyTransactionCompleted(ctx.getTransaction(), true, ctx);
@@ -34,7 +34,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
Object retval = invokeNextInterceptor(ctx, command);
notifier.notifyTransactionCompleted(ctx.getTransaction(), false, ctx);
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -60,21 +60,21 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
createNode(ctx, command.getFqn(), false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
createNode(ctx, command.getFqn(), false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
List<Fqn> fqns = new ArrayList<Fqn>();
fqns.add(command.getTo());
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -53,7 +53,7 @@
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
//try and acquire the locks - before passing on
GlobalTransaction gtx = getGlobalTransaction(ctx);
@@ -109,13 +109,13 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
return transactionFinalized(ctx, command);
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
return transactionFinalized(ctx, command);
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -79,7 +79,7 @@
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
GlobalTransaction gtx = getGlobalTransaction(ctx);
TransactionWorkspace workspace = getTransactionWorkspace(gtx);
@@ -94,7 +94,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
GlobalTransaction gtx = getGlobalTransaction(ctx);
TransactionWorkspace workspace = getTransactionWorkspace(gtx);
@@ -117,7 +117,7 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
GlobalTransaction gtx = getGlobalTransaction(ctx);
TransactionWorkspace workspace = getTransactionWorkspace(gtx);
@@ -141,7 +141,7 @@
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
GlobalTransaction gtx = getGlobalTransaction(ctx);
TransactionWorkspace workspace = getTransactionWorkspace(gtx);
@@ -160,7 +160,7 @@
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
GlobalTransaction gtx = getGlobalTransaction(ctx);
TransactionWorkspace workspace = getTransactionWorkspace(gtx);
@@ -176,7 +176,7 @@
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
GlobalTransaction gtx = getGlobalTransaction(ctx);
TransactionWorkspace workspace = getTransactionWorkspace(gtx);
@@ -191,7 +191,7 @@
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(getGlobalTransaction(ctx));
Object result;
@@ -215,7 +215,7 @@
}
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(getGlobalTransaction(ctx));
Object result;
@@ -238,7 +238,7 @@
}
@Override
- public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(getGlobalTransaction(ctx));
Object result;
@@ -260,7 +260,7 @@
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(getGlobalTransaction(ctx));
Object result;
@@ -282,7 +282,7 @@
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(getGlobalTransaction(ctx));
Object result;
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -88,7 +88,7 @@
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
// pass up the chain.
Object retval = invokeNextInterceptor(ctx, command);
@@ -106,7 +106,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
if (isLocalOptionOverrides(ctx))
{
@@ -138,7 +138,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
if (isLocalOptionOverrides(ctx))
{
@@ -170,7 +170,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
if (isLocalOptionOverrides(ctx))
{
@@ -291,13 +291,13 @@
}
@Override
- public Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
+ public Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
{
return command;
}
@Override
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
+ public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
EvictCommand clone = commandsFactory.buildEvictFqnCommand(command.getFqn());
return setDataVersion(clone, command.getFqn());
@@ -311,21 +311,21 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
PutDataMapCommand clone = commandsFactory.buildPutDataMapCommand(null, command.getFqn(), command.getData(), command.isCreateUndoOps(), command.isEraseContents());
return setDataVersion(clone, clone.getFqn());
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
PutKeyValueCommand clone = commandsFactory.buildPutKeyValueCommand(null, command.getFqn(), command.getKey(), command.getValue(), command.isCreateUndoOps(), command.isPutForExternalRead());
return setDataVersion(clone, command.getFqn());
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
RemoveNodeCommand clone = commandsFactory.buildRemoveNodeCommand(command.getGlobalTransaction(), command.getFqn(), command.isEviction(),
command.isSkipSendingNodeEvents(), command.isCreateUndoOps());
@@ -333,14 +333,14 @@
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
RemoveKeyCommand clone = commandsFactory.buildRemoveKeyCommand(null, command.getFqn(), command.getKey(), command.isCreateUndoOps());
return setDataVersion(clone, command.getFqn());
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
RemoveDataCommand clone = commandsFactory.buildRemoveDataCommand(command.getGlobalTransaction(), command.getFqn(), command.isCreateUndoops(),
command.isSendNodeEvent(), command.isEviction());
@@ -348,13 +348,13 @@
}
@Override
- public Object handleCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable
+ public Object visitCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable
{
return command;
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
return command;
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -62,7 +62,7 @@
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(getGlobalTransaction(ctx));
@@ -136,7 +136,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
GlobalTransaction gtx = getGlobalTransaction(ctx);
TransactionWorkspace workspace;
@@ -253,7 +253,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
TransactionWorkspace workspace;
workspace = getTransactionWorkspace(getGlobalTransaction(ctx));
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -49,7 +49,7 @@
* store using the CacheLoader.
*/
@Override
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand evictFqnCommand) throws Throwable
+ public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand evictFqnCommand) throws Throwable
{
Fqn fqn = evictFqnCommand.getFqn();
try
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -47,7 +47,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
if (!skipReplicationOfTransactionMethod(ctx))
replicateCall(ctx, command, config.isSyncCommitPhase(), ctx.getOptionOverrides(), true);
@@ -55,7 +55,7 @@
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
if (!skipReplicationOfTransactionMethod(ctx)) runPreparePhase(command, command.getGlobalTransaction(), ctx);
@@ -63,7 +63,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
if (!skipReplicationOfTransactionMethod(ctx) && !ctx.isLocalRollbackOnly())
{
@@ -73,7 +73,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
if (skipReplication(ctx)) return invokeNextInterceptor(ctx, command);
if (isTransactionalAndLocal(ctx))
@@ -92,31 +92,31 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return handleCrudMethod(ctx, command, false);
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
return handleCrudMethod(ctx, command, false);
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return handleCrudMethod(ctx, command, false);
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
return handleCrudMethod(ctx, command, false);
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
return handleCrudMethod(ctx, command, false);
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -99,13 +99,13 @@
@Override
@SuppressWarnings("unchecked")
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
- return handlePrepareCommand(ctx, command);
+ return visitPrepareCommand(ctx, command);
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
Object result = null;
boolean scrubTxsOnExit = false;
@@ -147,7 +147,7 @@
@Override
@SuppressWarnings("unchecked")
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
if (!ctx.getGlobalTransaction().isRemote())
{
@@ -202,7 +202,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
if (!ctx.getGlobalTransaction().isRemote())
{
@@ -398,7 +398,7 @@
@Override
- public Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
+ public Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
{
return invokeNextInterceptor(ctx, command);
}
@@ -650,31 +650,31 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return handleDataVersionCommand(ctx, command);
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
return handleDataVersionCommand(ctx, command);
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return handleDataVersionCommand(ctx, command);
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
return handleDataVersionCommand(ctx, command);
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
return handleDataVersionCommand(ctx, command);
}
@@ -1040,63 +1040,63 @@
m.acceptVisitor(null, new AbstractVisitor()
{
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
command.setGlobalTransaction(gtx);
return null;
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -32,7 +32,7 @@
public abstract class PostProcessingChainedInterceptor extends CommandInterceptor
{
@Override
- public final Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public final Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
try
{
@@ -50,7 +50,7 @@
}
@Override
- public final Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public final Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
try
{
@@ -68,7 +68,7 @@
}
@Override
- public final Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public final Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
try
{
@@ -86,7 +86,7 @@
}
@Override
- public final Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public final Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
try
{
@@ -104,7 +104,7 @@
}
@Override
- public final Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
+ public final Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
try
{
@@ -122,7 +122,7 @@
}
@Override
- public final Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
+ public final Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
{
try
{
@@ -140,7 +140,7 @@
}
@Override
- public final Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public final Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
try
{
@@ -158,7 +158,7 @@
}
@Override
- public final Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public final Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
try
{
@@ -176,7 +176,7 @@
}
@Override
- public final Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public final Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
{
try
{
@@ -194,7 +194,7 @@
}
@Override
- public final Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public final Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
try
{
@@ -212,7 +212,7 @@
}
@Override
- public final Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public final Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
try
{
@@ -230,7 +230,7 @@
}
@Override
- public final Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public final Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
try
{
@@ -248,7 +248,7 @@
}
@Override
- public final Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public final Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
try
{
@@ -266,7 +266,7 @@
}
@Override
- public final Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public final Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
try
{
@@ -284,7 +284,7 @@
}
@Override
- public final Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
+ public final Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
{
try
{
@@ -302,7 +302,7 @@
}
@Override
- public final Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public final Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
try
{
@@ -320,7 +320,7 @@
}
@Override
- public final Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public final Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
try
{
@@ -338,7 +338,7 @@
}
@Override
- public final Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public final Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
try
{
@@ -356,7 +356,7 @@
}
@Override
- public final Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public final Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
try
{
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -33,7 +33,7 @@
public abstract class SkipCheckChainedInterceptor extends CommandInterceptor
{
@Override
- public final Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public final Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -48,7 +48,7 @@
}
@Override
- public final Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public final Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -63,7 +63,7 @@
}
@Override
- public final Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public final Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -78,7 +78,7 @@
}
@Override
- public final Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public final Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -93,7 +93,7 @@
}
@Override
- public final Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
+ public final Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -108,7 +108,7 @@
}
@Override
- public final Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
+ public final Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -123,7 +123,7 @@
}
@Override
- public final Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public final Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -138,7 +138,7 @@
}
@Override
- public final Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ public final Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -153,7 +153,7 @@
}
@Override
- public final Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public final Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -168,7 +168,7 @@
}
@Override
- public final Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public final Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -183,7 +183,7 @@
}
@Override
- public final Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public final Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -198,7 +198,7 @@
}
@Override
- public final Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public final Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -213,7 +213,7 @@
}
@Override
- public final Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public final Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -228,7 +228,7 @@
}
@Override
- public final Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public final Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -243,7 +243,7 @@
}
@Override
- public final Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
+ public final Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -258,7 +258,7 @@
}
@Override
- public final Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public final Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -273,7 +273,7 @@
}
@Override
- public final Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public final Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -288,7 +288,7 @@
}
@Override
- public final Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public final Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
if (skipInterception(ctx))
{
@@ -303,7 +303,7 @@
}
@Override
- public final Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ public final Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
{
if (skipInterception(ctx))
{
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java 2008-04-28 15:46:13 UTC (rev 5727)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/MarshalledValueTest.java 2008-04-28 15:46:50 UTC (rev 5728)
@@ -325,7 +325,7 @@
int invocationCount = 0;
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
invocationCount++;
Object retval = invokeNextInterceptor(ctx, command);
@@ -333,7 +333,7 @@
return retval;
}
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
invocationCount++;
if (command.getKey() instanceof MarshalledValue)
16 years, 8 months
JBoss Cache SVN: r5727 - core/trunk/src/test/resources.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-28 11:46:13 -0400 (Mon, 28 Apr 2008)
New Revision: 5727
Modified:
core/trunk/src/test/resources/log4j.xml
Log:
JBCACHE-1222 - rolled back
Modified: core/trunk/src/test/resources/log4j.xml
===================================================================
--- core/trunk/src/test/resources/log4j.xml 2008-04-28 15:41:51 UTC (rev 5726)
+++ core/trunk/src/test/resources/log4j.xml 2008-04-28 15:46:13 UTC (rev 5727)
@@ -22,7 +22,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
- <param name="File" value="../za_trunk_jbosscache.log"/>
+ <param name="File" value="../jbosscache.log"/>
<param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
@@ -31,7 +31,7 @@
<!-- Rollover at the top of each hour
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-->
- <param name="Threshold" value="TRACE"/>
+ <param name="Threshold" value="DEBUG"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -63,7 +63,7 @@
<!-- ================ -->
<category name="org.jboss.cache">
- <priority value="TRACE"/>
+ <priority value="WARN"/>
</category>
<category name="org.jboss.tm">
@@ -79,7 +79,7 @@
<!-- ======================= -->
<root>
- <!--<appender-ref ref="CONSOLE"/>-->
+ <!-- <appender-ref ref="CONSOLE"/> -->
<appender-ref ref="FILE"/>
</root>
16 years, 8 months
JBoss Cache SVN: r5726 - in core/trunk/src: main/java/org/jboss/cache/commands/write and 4 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-28 11:41:51 -0400 (Mon, 28 Apr 2008)
New Revision: 5726
Modified:
core/trunk/src/main/java/org/jboss/cache/DataContainer.java
core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java
core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java
core/trunk/src/test/resources/log4j.xml
Log:
JBCACHE-1222 - fixed eviction
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-04-28 15:02:26 UTC (rev 5725)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-04-28 15:41:51 UTC (rev 5726)
@@ -455,18 +455,24 @@
}
}
+ /**
+ * @return true if the FQN is leaf and was removed; false if is an intermediate FQN and only contained data
+ * is droped.
+ */
public boolean evict(Fqn fqn)
{
if (peek(fqn, false, true) == null) return true;
- if (log.isTraceEnabled())
- log.trace("evict(" + fqn + ")");
if (hasChild(fqn))
{
+ if (log.isTraceEnabled())
+ log.trace("removing DATA as node has children: evict(" + fqn + ")");
removeData(fqn);
return false;
}
else
{
+ if (log.isTraceEnabled())
+ log.trace("removing NODE as it is a leaf: evict(" + fqn + ")");
removeNode(fqn);
return true;
}
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 15:02:26 UTC (rev 5725)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-28 15:41:51 UTC (rev 5726)
@@ -2,6 +2,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
+import org.jboss.cache.NodeSPI;
import org.jboss.cache.commands.Visitor;
import java.util.List;
@@ -24,8 +25,18 @@
this.fqn = fqn;
}
+ /**
+ * Returns false if the node still exists; i.e. was only data removed because it still has children.
+ * @see org.jboss.cache.interceptors.EvictionInterceptor#handleEvictFqnCommand(org.jboss.cache.InvocationContext, EvictCommand)
+ * there is wehere this attribute is used
+ */
public Object perform(InvocationContext ctx)
{
+ NodeSPI node = dataContainer.peek(fqn, false);
+ if (node != null && node.isResident())
+ {
+ return true;
+ }
if (recursive)
{
@@ -35,19 +46,24 @@
{
evictNode(aFqn, ctx);
}
+ return null;
}
else
{
- evictNode(fqn, ctx);
+ return evictNode(fqn, ctx);
}
- return null;
}
- void evictNode(Fqn fqn, InvocationContext ctx)
+ boolean evictNode(Fqn fqn, InvocationContext ctx)
{
notifier.notifyNodeEvicted(fqn, true, ctx);
- dataContainer.evict(fqn);
- notifier.notifyNodeEvicted(fqn, false, ctx);
+ try
+ {
+ return dataContainer.evict(fqn);
+ } finally
+ {
+ notifier.notifyNodeEvicted(fqn, false, ctx);
+ }
}
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java 2008-04-28 15:02:26 UTC (rev 5725)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/EvictionTimerTask.java 2008-04-28 15:41:51 UTC (rev 5726)
@@ -96,11 +96,11 @@
* This thread will synchronize the set of regions and iterate through every MarshRegion registered w/ the
* Eviction thread. It also synchronizes on each individual region as it is being processed.
*/
- @Override
public void run()
{
synchronized (processedRegions)
{
+ log.trace("***** eviction kicks in");
for (Region region : processedRegions)
{
final EvictionPolicy policy = region.getEvictionPolicy();
@@ -117,7 +117,7 @@
catch (EvictionException e)
{
log.error("run(): error processing eviction with exception: " + e.toString()
- + " will reset the eviction queue list.");
+ + " will reset the eviction queue list.");
region.resetEvictionQueues();
log.debug("trace", e);
}
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java 2008-04-28 15:02:26 UTC (rev 5725)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java 2008-04-28 15:41:51 UTC (rev 5726)
@@ -54,6 +54,8 @@
if (log.isTraceEnabled())
{
log.trace("Node " + entry.getFqn() + " should be evicted because of idle time");
+ log.trace("Time to live in millies is: " + (config.getTimeToLiveSeconds() * 1000));
+ log.trace("Config instance is: " + System.identityHashCode(config));
}
return true;
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-04-28 15:02:26 UTC (rev 5725)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-04-28 15:41:51 UTC (rev 5726)
@@ -90,7 +90,7 @@
@Override
public Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable
{
- if (trace) log.trace("Executing command: " + command.getClass().getSimpleName() + ".");
+ if (trace) log.trace("Executing command: " + command + ".");
return invokeCommand(ctx, command);
}
Modified: core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java 2008-04-28 15:02:26 UTC (rev 5725)
+++ core/trunk/src/test/java/org/jboss/cache/api/ResidentNodesTest.java 2008-04-28 15:41:51 UTC (rev 5726)
@@ -107,6 +107,19 @@
}
+ public void simpleTest() throws Exception
+ {
+ cache.put(getSubFqn("/a"), "k_a", "v_a");
+ cache.put(getSubFqn("/b"), "k_b", "v_b");
+ cache.put(getSubFqn("/c"), "k_c", "v_c");
+ cache.put(getSubFqn("/d"), "k_d", "v_d");
+ Thread.sleep(3000);//so that eviction is activated
+ assertFalse(cache.exists(getSubFqn("/a")));
+ assertTrue(cache.exists(getSubFqn("/b")));
+ assertTrue(cache.exists(getSubFqn("/c")));
+ assertTrue(cache.exists(getSubFqn("/d")));
+ }
+
/**
* If a node is marked as resident, and a get is made on that given node then an VISITED event would normally be
* added to the eviction queue. In a LRU scenario, this will cause another node to be evicted given that the size of
Modified: core/trunk/src/test/resources/log4j.xml
===================================================================
--- core/trunk/src/test/resources/log4j.xml 2008-04-28 15:02:26 UTC (rev 5725)
+++ core/trunk/src/test/resources/log4j.xml 2008-04-28 15:41:51 UTC (rev 5726)
@@ -22,7 +22,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
- <param name="File" value="jbosscache.log"/>
+ <param name="File" value="../za_trunk_jbosscache.log"/>
<param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
16 years, 8 months
JBoss Cache SVN: r5725 - core/trunk/src/main/java/org/jboss/cache/loader.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-28 11:02:26 -0400 (Mon, 28 Apr 2008)
New Revision: 5725
Modified:
core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
Log:
TODOs
Modified: core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2008-04-28 14:58:24 UTC (rev 5724)
+++ core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2008-04-28 15:02:26 UTC (rev 5725)
@@ -184,27 +184,11 @@
{
// start a tx
cf.prepare(tx);
-
- try
- {
- put(modifications);
-
- // commit if it's one phase only
- if (one_phase)
- {
- commit(tx);
- }
- }
- catch (Exception e)
- {
- // todo should I rollback it here or rollback is supposed to be invoke by someone from outside?
- rollback(tx);
- // is this ok?
- throw e;
- }
+ put(modifications);
+ // commit if it's one phase only
+ if (one_phase) commit(tx);
}
-
/**
* Commits a transaction.
*
16 years, 8 months
JBoss Cache SVN: r5724 - in core/trunk/src: main/java/org/jboss/cache/buddyreplication and 5 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-28 10:58:24 -0400 (Mon, 28 Apr 2008)
New Revision: 5724
Modified:
core/trunk/src/main/java/org/jboss/cache/Fqn.java
core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java
core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/StringFqn.java
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java
core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
core/trunk/src/main/java/org/jboss/cache/factories/InterceptorChainFactory.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
core/trunk/src/test/java/org/jboss/cache/FqnTest.java
core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
Log:
TODOs
Modified: core/trunk/src/main/java/org/jboss/cache/Fqn.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/Fqn.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/Fqn.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -110,7 +110,7 @@
// ----------------- START: Private constructors for use by factory methods only. ----------------------
- // TODO: Remove the unnecessary internalMarker boolean parameters to these methods once the deprecated public constructors are removed in 3.0.0.
+ // TODO: 3.0.0: Remove the unnecessary internalMarker boolean parameters to these methods once the deprecated public constructors are removed in 3.0.0.
protected Fqn(boolean internalMarker)
{
Modified: core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/LifecycleManager.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -353,9 +353,6 @@
dataContainer.getRoot().removeChildrenDirect();
}
- //todo - this should reather be implemented as follows:
- // List<Component>comps = registry.detComponentsDependingOn(a component)
- // registry.unregsiterComponents(comps);
private void removeConfigurationDependentComponents()
{
// remove the Interceptor.class component though, since it may pertain to an old config
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -112,7 +112,7 @@
// ------------ START: Lifecycle methods ------------
- // TODO: This needs to be started manually for now, rather than by @Start. See CacheImpl.internalStart()
+ // TODO: 2.2.0: This needs to be started manually for now, rather than by @Start. See CacheImpl.internalStart()
public void start()
{
Modified: core/trunk/src/main/java/org/jboss/cache/StringFqn.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -15,7 +15,7 @@
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.2.0
*/
-// TODO: Implement proper String escaping.
+// TODO: 2.2.0: Implement proper String escaping.
public class StringFqn extends Fqn
{
// Needs to be public because of NodeData serialization.
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -241,7 +241,7 @@
}
}
- // TODO: This needs to be started manually for now, rather than by @Start. See CacheImpl.internalStart()
+ // TODO: 2.2.0: This needs to be started manually for now, rather than by @Start. See CacheImpl.internalStart()
public void init() throws CacheException
{
log.debug("Starting BuddyManager");
Modified: core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -66,7 +66,7 @@
@Override
public Object perform(InvocationContext ctx)
{
- //todo - rather than using CacheSPI this should use peek(). The other interceptors should obtain locks and load nodes if necessary for this InvalidateCommand.
+ //TODO: 2.2.0: rather than using CacheSPI this should use peek(). The other interceptors should obtain locks and load nodes if necessary for this InvalidateCommand.
Node node = spi.getNode(fqn); // force interceptor chain, load if necessary from cache loader.
if (trace) log.trace("Invalidating fqn:" + fqn);
Modified: core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -63,7 +63,7 @@
*/
public class ComponentRegistry
{
- // TODO: Needs refactoring
+ // TODO: 2.2.0: Needs refactoring
static final Object NULL_COMPONENT = new Object();
State overallState = CONSTRUCTED;
Modified: core/trunk/src/main/java/org/jboss/cache/factories/InterceptorChainFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/InterceptorChainFactory.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/factories/InterceptorChainFactory.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -34,7 +34,7 @@
private CommandInterceptor createInterceptor(Class<? extends CommandInterceptor> clazz) throws IllegalAccessException, InstantiationException
{
- //todo - no reason for the individual interceptors to be registered as components, all manipulation should be done through InterceptorChain
+ //TODO: 2.2.0: no reason for the individual interceptors to be registered as components, all manipulation should be done through InterceptorChain
CommandInterceptor chainedInterceptor = componentRegistry.getComponent(clazz.getName(), clazz);
if (chainedInterceptor == null)
{
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -179,11 +179,11 @@
}
else
{
- // TODO: Revisit this, this is a bug if a local rollback occurs!!
+ // TODO: 2.2.0: Revisit this, this is a bug if a local rollback occurs!!
transactionTable.addModification(gtx, command);
}
- // todo: consolidate cache loader and regular modification lists!!
+ // TODO: 2.2.0: consolidate cache loader and regular modification lists!!
// if (cacheLoaderManager != null)
if (cacheLoadingEnabled) transactionTable.addCacheLoaderModification(gtx, command);
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -202,7 +202,7 @@
{
// Map method calls to data versioned equivalents.
// See JBCACHE-843 and docs/design/DataVersioning.txt
- //todo make the interceptor a field
+ //TODO: 2.2.0: make the interceptor a field
DataVersionPopulator populator = new DataVersionPopulator(getTransactionWorkspace(gtx));
List<ReversibleCommand> clonedModifications = new ArrayList<ReversibleCommand>(command.getModifications().size());
for (ReversibleCommand command1 : command.getModifications())
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -39,7 +39,7 @@
import java.util.List;
/*
-* todo refactorings ideas
+* // TODO: 2.2.0: refactorings ideas
* - thre are many places in code that handles that coputes the lock owners: either GTX or Thread.local. The
* lockOwner can be abstractised as a LockOwner that can be extended by CurrentThreadLock owner and
GlobalTransaction owner. This would make the code nicer.
@@ -229,13 +229,13 @@
Object retVal = invokeNextInterceptor(ctx, command);
// and make sure we remove all nodes we've created for the sake of later removal.
- //todo [mmarkus] this logic should be moved within moveNodeCommand, as it is plain removal logic
+ //TODO: 2.2.0: [mmarkus] this logic should be moved within moveNodeCommand, as it is plain removal logic
if (ctx.getGlobalTransaction() == null)
{
for (NodeSPI nodeSPI : createdNodes) dataContainer.realRemove(nodeSPI.getFqn(), true);
dataContainer.realRemove(command.getFqn(), true);
- //todo end of the logic that needs to be moved
+ //TODO: 2.2.0: end of the logic that needs to be moved
NodeSPI n = dataContainer.peek(command.getFqn(), true, false);
if (n != null)
{
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -890,7 +890,7 @@
*/
private List<ReversibleCommand> compact(List<ReversibleCommand> mods)
{
- // TODO: Make this more sophisticated, so it aggregates multiple puts on the same node, puts followed by a remove, etc.
+ // TODO: 3.0.0: Make this more sophisticated, so it aggregates multiple puts on the same node, puts followed by a remove, etc.
// for now this just removes the redundant CreateNodeCommands from the list.
List<ReversibleCommand> newList = new LinkedList<ReversibleCommand>();
for (ReversibleCommand cmd : mods)
Modified: core/trunk/src/test/java/org/jboss/cache/FqnTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/FqnTest.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/test/java/org/jboss/cache/FqnTest.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -478,7 +478,7 @@
}
@Test(enabled = false)
- // TODO enable once String escaping is in place
+ // TODO: 2.2.0: enable once String escaping is in place
public void testUnescapedString()
{
@@ -501,7 +501,7 @@
}
@Test(enabled = false)
- // TODO enable once String escaping is in place
+ // TODO 2.2.0: enable once String escaping is in place
public void testEscapedString()
{
String str = "/a/b" + '\\' + "/c/d"; // should result in a Fqn with elements "a", "b/c", "d".
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-04-28 14:53:03 UTC (rev 5723)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-04-28 14:58:24 UTC (rev 5724)
@@ -403,7 +403,7 @@
@Test(groups = {"functional"})
public void testConcurrency() throws InterruptedException
{
- // TODO: investigate intermittent failure when in optimistic mode.
+ // TODO: 2.2.0: investigate intermittent failure when in optimistic mode.
if (optimistic) return;
final int N = 3;// number of threads
16 years, 8 months