JBoss Cache SVN: r5753 - in core/trunk/src/main/java/org/jboss/cache: commands and 9 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-29 10:28:51 -0400 (Tue, 29 Apr 2008)
New Revision: 5753
Added:
core/trunk/src/main/java/org/jboss/cache/commands/read/ExistsCommand.java
Removed:
core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java
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/ReplicableCommand.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/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/AbstractTransactionCommand.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/factories/CommandsFactory.java
core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingCommandInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java
core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java
core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java
Log:
Javadocs and renaming
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyFqnTransformer.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -5,13 +5,13 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.AbstractVisitor;
import org.jboss.cache.commands.ReversibleCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
@@ -128,7 +128,7 @@
}
@Override
- public Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public Object visitExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
{
Fqn transformed = getBackupFqn(command.getFqn());
return factory.buildEvictFqnCommand(transformed);
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/AbstractVisitor.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -1,13 +1,13 @@
package org.jboss.cache.commands;
import org.jboss.cache.InvocationContext;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
@@ -73,7 +73,7 @@
return handleDefault(ctx, command);
}
- public Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public Object visitExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
Modified: core/trunk/src/main/java/org/jboss/cache/commands/ReplicableCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/ReplicableCommand.java 2008-04-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/ReplicableCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -13,7 +13,8 @@
public interface ReplicableCommand extends Cloneable
{
/**
- * Performs the primary function of the command.
+ * Performs the primary function of the command. Please see specific implementation classes for details on what is
+ * performed as well as return types.
*
* @param ctx invocation context
* @return arbitrary return value generated by performing this command
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/Visitor.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -1,13 +1,13 @@
package org.jboss.cache.commands;
import org.jboss.cache.InvocationContext;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
@@ -121,7 +121,7 @@
* @return response from the visit
* @throws Throwable in the event of problems.
*/
- Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable;
+ Object visitExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable;
/**
* Visits a GetKeyValueCommand.
Copied: core/trunk/src/main/java/org/jboss/cache/commands/read/ExistsCommand.java (from rev 5738, core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java)
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/ExistsCommand.java (rev 0)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/ExistsCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -0,0 +1,57 @@
+package org.jboss.cache.commands.read;
+
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.Node;
+import org.jboss.cache.commands.Visitor;
+
+/**
+ * Checks whether a given node exists in current in-memory state of the cache.
+ * Does not acquire any locks in doing so (result may be dirty read). Does
+ * 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)}
+ * <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.0
+ */
+public class ExistsCommand extends AbstractDataCommand
+{
+ public static final int METHOD_ID = 16;
+
+ public ExistsCommand()
+ {
+ }
+
+ public ExistsCommand(Fqn fqn)
+ {
+ this.fqn = fqn;
+ }
+
+ /**
+ * Checks whether a node represented by a given Fqn exists.
+ *
+ * @param ctx invocation context
+ * @return true if the node exists, false otherwise.
+ */
+ public Object perform(InvocationContext ctx)
+ {
+ Node n = dataContainer.peek(fqn, false);
+ return n != null;
+ }
+
+ public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
+ {
+ return visitor.visitExistsNodeCommand(ctx, this);
+ }
+
+ public int getCommandId()
+ {
+ return METHOD_ID;
+ }
+}
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -33,6 +33,12 @@
this.fqn = fqn;
}
+ /**
+ * Retrieves the names of children for a specific Fqn.
+ *
+ * @param ctx invocation context
+ * @return a Set<Object> of child names, for a given Fqn, or null if the Fqn refers to a node that does not exist.
+ */
public Object perform(InvocationContext ctx)
{
NodeSPI n = dataContainer.findNode(fqn);
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetDataMapCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -29,6 +29,12 @@
this.fqn = fqn;
}
+ /**
+ * Retrieves an unmodifiable map of data contained in a node referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return an unmodifiable Map<K, V> of data contained in a node for a given Fqn, or null if the Fqn refers to a node that does not exist.
+ */
public Object perform(InvocationContext ctx)
{
NodeSPI n = dataContainer.findNode(fqn);
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -47,6 +47,12 @@
this.notifier = notifier;
}
+ /**
+ * Retrieves the value stored under a specified key in a node referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return an Object of type V, stored under a specific key in a node for a given Fqn, or null if the Fqn refers to a node that does not exist.
+ */
public Object perform(InvocationContext ctx)
{
if (trace)
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetKeysCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -30,13 +30,17 @@
this.fqn = fqn;
}
+ /**
+ * Retrieves Set of keys for all the data stored in a node referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return a Set<K> of data keys contained in a node for a given Fqn, or null if the Fqn refers to a node that does not exist.
+ */
+ @SuppressWarnings("unchecked")
public Object perform(InvocationContext ctx)
{
NodeSPI n = dataContainer.findNode(fqn);
- if (n == null)
- {
- return null;
- }
+ if (n == null) return null;
Set keys = n.getKeysDirect();
return new HashSet(keys);
}
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetNodeCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -26,6 +26,12 @@
this.fqn = fqn;
}
+ /**
+ * Retrieves a {@link org.jboss.cache.Node} referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return a Node, or null if the Fqn refers to a node that does not exist.
+ */
public Object perform(InvocationContext ctx)
{
return dataContainer.findNode(fqn);
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GravitateDataCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -62,6 +62,13 @@
this.spi = spi;
}
+ /**
+ * Searches for data to gravitate given an Fqn and whether buddy backup subtrees are to be searched as well. Note that
+ * data stored under the Fqn, along with all children, are retrieved.
+ *
+ * @param ctx invocation context
+ * @return a {@link org.jboss.cache.buddyreplication.GravitateResult} containing node data, as well as information on whether this was found in a primary or backup tree.
+ */
public Object perform(InvocationContext ctx)
{
// for now, perform a very simple series of getData calls.
Deleted: 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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -1,51 +0,0 @@
-package org.jboss.cache.commands.read;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.InvocationContext;
-import org.jboss.cache.Node;
-import org.jboss.cache.commands.Visitor;
-
-/**
- * Checks whether a given node exists in current in-memory state of the cache.
- * Does not acquire any locks in doing so (result may be dirty read). Does
- * 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)}
- * <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.0
- */
-public class RemoteExistsCommand extends AbstractDataCommand
-{
- public static final int METHOD_ID = 16;
-
- public RemoteExistsCommand()
- {
- }
-
- public RemoteExistsCommand(Fqn fqn)
- {
- this.fqn = fqn;
- }
-
- public Object perform(InvocationContext ctx)
- {
- Node n = dataContainer.peek(fqn, false);
- return n != null;
- }
-
- public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
- {
- return visitor.visitExistsNodeCommand(ctx, this);
- }
-
- public int getCommandId()
- {
- return METHOD_ID;
- }
-}
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/AnnounceBuddyPoolNameCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -43,6 +43,13 @@
this.buddyManager = buddyManager;
}
+ /**
+ * This method calls the relevant handler on the buddy manager to deal with this pool broadcast.
+ *
+ * @param ctx invocation context, ignored.
+ * @return null
+ * @throws Throwable in the event of problems
+ */
public Object perform(InvocationContext ctx) throws Throwable
{
if (buddyManager != null)
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/AssignToBuddyGroupCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -43,6 +43,13 @@
this.buddyManager = manager;
}
+ /**
+ * This method calls the relevant handler on the buddy manager to deal with being assigned to a buddy group
+ *
+ * @param ctx invocation context, ignored.
+ * @return null
+ * @throws Throwable in the event of problems
+ */
public Object perform(InvocationContext ctx) throws Throwable
{
if (buddyManager != null)
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -5,9 +5,9 @@
import org.jboss.cache.DataContainer;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.DataCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.interceptors.InterceptorChain;
@@ -56,10 +56,10 @@
}
/**
- * A 'clustered get' call, called from a remote ClusteredCacheLoader.
+ * Invokes a {@link org.jboss.cache.commands.DataCommand} on a remote cache and returns results.
*
- * @return a List containing 2 elements: (true or false) and a value (Object). If buddy replication
- * is used one further element is added - an Fqn of the backup subtree in which this node may be found.
+ * @param context invocation context, ignored.
+ * @return a List containing 2 elements: a boolean, (true or false) and a value (Object) which is the result of invoking a remote get specified by {@link #getDataCommand()}. If buddy replication is used one further element is added - an Fqn of the backup subtree in which this node may be found.
*/
public Object perform(InvocationContext context) throws Throwable
{
@@ -111,7 +111,7 @@
{
return callResults != null && dataContainer.exists(dataCommand.getFqn());
}
- return dataCommand instanceof RemoteExistsCommand && (Boolean) callResults;
+ return dataCommand instanceof ExistsCommand && (Boolean) callResults;
}
/**
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -70,6 +70,13 @@
this.dataContainer = dataContainer;
}
+ /**
+ * Performs a cleanup on nodes that would have been previously gravitated away from the current cache instance.
+ *
+ * @param ctx invocation context, ignored
+ * @return null
+ * @throws Throwable
+ */
public Object perform(InvocationContext ctx) throws Throwable
{
if (buddyManager.isDataGravitationRemoveOnFind())
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoveFromBuddyGroupCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -35,6 +35,12 @@
this.buddyManager = buddyManager;
}
+ /**
+ * This method calls the relevant handler on the buddy manager to deal with being removed from a buddy group
+ *
+ * @param ctx invocation context, ignored.
+ * @return null
+ */
public Object perform(InvocationContext ctx)
{
if (buddyManager != null)
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -83,9 +83,27 @@
this.modifications = modifications;
}
+ /**
+ * Executes commands replicated to the current cache instance by other cache instances.
+ *
+ * @param ctx invocation context, ignored.
+ * @return if this is a single command being processed <b>and</b> it is a {@link org.jboss.cache.commands.read.GravitateDataCommand}, the result of processing this command is returned. Otherwise, null is returned.
+ * @throws Throwable
+ */
public Object perform(InvocationContext ctx) throws Throwable
{
- if (isSingleCommand()) return processSingleCommand(singleModification);
+ if (isSingleCommand())
+ {
+ Object retVal = processSingleCommand(singleModification);
+
+ // only send back the result of the execution if it is a data gravitation command.
+ // all other commands don't need to send back return values, there will be an unnecessary overhead of
+ // marshalling results that won't ever be used.
+ if (singleModification instanceof GravitateDataCommand)
+ return retVal;
+ else
+ return null;
+ }
for (ReplicableCommand command : modifications) processSingleCommand(command);
return null;
}
Modified: core/trunk/src/main/java/org/jboss/cache/commands/tx/AbstractTransactionCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/tx/AbstractTransactionCommand.java 2008-04-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/tx/AbstractTransactionCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -17,7 +17,7 @@
protected GlobalTransaction globalTransaction;
/**
- * Default implementation which is a no-op.
+ * Default implementation which is a no-op. Transaction boundary commands always return a null.
*
* @return null
*/
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/CreateNodeCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -47,6 +47,13 @@
return null;
}
+ /**
+ * Creates a node in the cache, specified by the given Fqn.
+ *
+ * @param ctx invocation context
+ * @return a Node
+ * @throws Throwable in the event of problems
+ */
public Object perform(InvocationContext ctx) throws Throwable
{
Object[] results = dataContainer.createNodes(fqn);
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/EvictCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -26,10 +26,13 @@
}
/**
- * Returns false if the node still exists; i.e. was only data removed because it still has children.
+ * Evicts a node.
* <p/>
* See {@link org.jboss.cache.interceptors.EvictionInterceptor#visitEvictFqnCommand(org.jboss.cache.InvocationContext, EvictCommand)}
- * which is where this return value is used
+ * which is where the return value is used
+ *
+ * @param ctx invocaton context
+ * @return true if the node was removed from the tree. Returns false if the node still exists; i.e. was only data removed because it still has children.
*/
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/InvalidateCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -63,6 +63,12 @@
this.isOptimisticLocking = configuration.isNodeLockingOptimistic();
}
+ /**
+ * Performs an invalidation on a specified node
+ *
+ * @param ctx invocation context
+ * @return null
+ */
@Override
public Object perform(InvocationContext ctx)
{
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -58,6 +58,12 @@
this.globalTransaction = globalTransaction;
}
+ /**
+ * Moves a node, from <tt>fqn</tt> to <tt>to</tt>, and returns null.
+ *
+ * @param ctx invocation context
+ * @return null
+ */
public Object perform(InvocationContext ctx)
{
move(fqn, to, false, 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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/PutDataMapCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -51,6 +51,13 @@
this.eraseContents = eraseContents;
}
+ /**
+ * Adds the provided data map to the data map in the node referenced by the specified Fqn, optionally erasing the node's
+ * data first (if {@link #isEraseContents()} is <tt>true</tt>).
+ *
+ * @param ctx invocation context
+ * @return null
+ */
public Object perform(InvocationContext ctx)
{
if (trace)
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -54,6 +54,12 @@
this.putForExternalRead = putForExternalRead;
}
+ /**
+ * Puts the specified key and value into the data map in the node referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return the value being overwritten, if any, otherwise a null.
+ */
public Object perform(InvocationContext ctx)
{
if (trace)
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveDataCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -48,6 +48,12 @@
this.eviction = eviction;
}
+ /**
+ * Clears the data map in the node referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return null
+ */
public Object perform(InvocationContext ctx)
{
if (trace) log.trace("perform(" + globalTransaction + ", \"" + fqn + "\")");
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveKeyCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -46,6 +46,12 @@
this.createUndoOps = createUndoOps;
}
+ /**
+ * Removes the specified key from the data map in the node referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return the value being removed, if any, otherwise a null.
+ */
public Object perform(InvocationContext ctx)
{
if (trace) log.trace("perform(" + globalTransaction + ", \"" + fqn + "\", key=" + key + ")");
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/RemoveNodeCommand.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -48,6 +48,12 @@
this.eviction = eviction;
}
+ /**
+ * Removes the node referenced by the specified Fqn.
+ *
+ * @param ctx invocation context
+ * @return true if the node was found and removed, false otherwise.
+ */
public Object perform(InvocationContext ctx)
{
NodeSPI parentNode;
Modified: core/trunk/src/main/java/org/jboss/cache/factories/CommandsFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/CommandsFactory.java 2008-04-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/factories/CommandsFactory.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -7,13 +7,13 @@
import org.jboss.cache.commands.DataCommand;
import org.jboss.cache.commands.ReplicableCommand;
import org.jboss.cache.commands.ReversibleCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
import org.jboss.cache.commands.remote.ClusteredGetCommand;
@@ -178,9 +178,9 @@
return command;
}
- public RemoteExistsCommand buildExistsNodeCommand(Fqn fqn)
+ public ExistsCommand buildExistsNodeCommand(Fqn fqn)
{
- RemoteExistsCommand command = new RemoteExistsCommand(fqn);
+ ExistsCommand command = new ExistsCommand(fqn);
registry.wireDependencies(command);
return command;
}
@@ -295,8 +295,8 @@
ReplicableCommand returnValue;
switch (id)
{
- case RemoteExistsCommand.METHOD_ID:
- returnValue = new RemoteExistsCommand();
+ case ExistsCommand.METHOD_ID:
+ returnValue = new ExistsCommand();
break;
case GetChildrenNamesCommand.METHOD_ID:
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -16,13 +16,13 @@
import org.jboss.cache.buddyreplication.GravitateResult;
import org.jboss.cache.commands.DataCommand;
import org.jboss.cache.commands.ReplicableCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
@@ -107,7 +107,7 @@
}
@Override
- public Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public Object visitExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
{
return handleGetMethod(ctx, command);
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingCommandInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingCommandInterceptor.java 2008-04-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingCommandInterceptor.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -2,13 +2,13 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.VisitableCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
@@ -182,7 +182,7 @@
}
@Override
- public final Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public final Object visitExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
{
try
{
@@ -194,7 +194,7 @@
}
}
- protected Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ protected Object handleExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
{
return handleDefault(ctx, command);
}
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-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -2,13 +2,13 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.VisitableCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
@@ -159,7 +159,7 @@
}
@Override
- public final Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ public final Object visitExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
{
if (skipInterception(ctx, command))
{
@@ -168,7 +168,7 @@
return handleExistsNodeCommand(ctx, command);
}
- protected Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
+ protected Object handleExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
{
return handleAll(ctx, command);
}
Modified: core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java 2008-04-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -15,10 +15,10 @@
import org.jboss.cache.NodeSPI;
import org.jboss.cache.RegionManager;
import org.jboss.cache.commands.DataCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.remote.ClusteredGetCommand;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import org.jboss.cache.factories.CommandsFactory;
@@ -190,7 +190,7 @@
lock.acquireLock(name, false);
try
{
- RemoteExistsCommand command = commandsFactory.buildExistsNodeCommand(name);
+ ExistsCommand command = commandsFactory.buildExistsNodeCommand(name);
Object resp = callRemote(command);
return resp != null && (Boolean) resp;
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java 2008-04-29 14:17:19 UTC (rev 5752)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java 2008-04-29 14:28:51 UTC (rev 5753)
@@ -15,12 +15,12 @@
import org.jboss.cache.commands.DataCommand;
import org.jboss.cache.commands.ReplicableCommand;
import org.jboss.cache.commands.ReversibleCommand;
+import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
import org.jboss.cache.commands.remote.ClusteredGetCommand;
@@ -150,7 +150,7 @@
case GetDataMapCommand.METHOD_ID:
case GetKeyValueCommand.METHOD_ID:
case GetKeysCommand.METHOD_ID:
- case RemoteExistsCommand.METHOD_ID:
+ case ExistsCommand.METHOD_ID:
fqn = ((DataCommand) cmd).getFqn();
break;
16 years, 8 months
JBoss Cache SVN: r5752 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-29 10:17:19 -0400 (Tue, 29 Apr 2008)
New Revision: 5752
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh
Log:
dos2unix
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh 2008-04-29 13:35:27 UTC (rev 5751)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh 2008-04-29 14:17:19 UTC (rev 5752)
@@ -1,18 +1,18 @@
-#!/bin/bash
-
-#see "$CACHE_ROOT/cache-products/cache.sh" for details
-
-THIS_DIR="./cache-products/jbosscache-2.2.0"
-
-#setting up classpath
-for JAR in $THIS_DIR/lib/*
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
-CLASSPATH="$CLASSPATH:./classes/production/jbosscache-2.2.0"
-CLASSPATH="$CLASSPATH:$THIS_DIR/conf"
-#--classpath was set
-
-#additional JVM options
+#!/bin/bash
+
+#see "$CACHE_ROOT/cache-products/cache.sh" for details
+
+THIS_DIR="./cache-products/jbosscache-2.2.0"
+
+#setting up classpath
+for JAR in $THIS_DIR/lib/*
+do
+ CLASSPATH=$CLASSPATH:$JAR
+done
+
+CLASSPATH="$CLASSPATH:./classes/production/jbosscache-2.2.0"
+CLASSPATH="$CLASSPATH:$THIS_DIR/conf"
+#--classpath was set
+
+#additional JVM options
JVM_OPTIONS="$JVM_OPTIONS -Xmx1024m -Djava.net.preferIPv4Stack=true" JVM_OPTIONS="$JVM_OPTIONS -DcacheBenchFwk.cacheWrapperClassName=org.cachebench.cachewrappers.JBossCache220Wrapper"
\ No newline at end of file
16 years, 8 months
JBoss Cache SVN: r5751 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-29 09:35:27 -0400 (Tue, 29 Apr 2008)
New Revision: 5751
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java
Log:
added 2.2.0 bench support
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java 2008-04-29 13:27:54 UTC (rev 5750)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java 2008-04-29 13:35:27 UTC (rev 5751)
@@ -3,10 +3,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.cachebench.CacheWrapper;
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheSPI;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.Fqn;
+import org.jboss.cache.*;
import org.jboss.cache.buddyreplication.GravitateResult;
import org.jboss.cache.marshall.NodeData;
@@ -71,7 +68,7 @@
public Object getReplicatedData(String key) throws Exception
{
CacheSPI cacheSpi = (CacheSPI) cache;
- GravitateResult result = cacheSpi.gravitateData(new Fqn("test", key), true, null);
+ GravitateResult result = cacheSpi.gravitateData(new Fqn("test", key), true, new InvocationContext());
if (!result.isDataFound())
{
//totall replication?
16 years, 8 months
JBoss Cache SVN: r5750 - in core/trunk/src/test/java/org/jboss/cache: loader and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-29 09:27:54 -0400 (Tue, 29 Apr 2008)
New Revision: 5750
Added:
core/trunk/src/test/java/org/jboss/cache/misc/ViewChangeListener.java
Modified:
core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java
core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java
Log:
Better RPC
Modified: core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java 2008-04-29 13:12:43 UTC (rev 5749)
+++ core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java 2008-04-29 13:27:54 UTC (rev 5750)
@@ -6,16 +6,13 @@
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.misc.TestingUtil;
-import org.jboss.cache.notifications.annotation.CacheListener;
-import org.jboss.cache.notifications.annotation.ViewChanged;
-import org.jboss.cache.notifications.event.ViewChangedEvent;
+import org.jboss.cache.misc.ViewChangeListener;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.util.List;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@Test(groups = "functional")
@@ -103,31 +100,10 @@
cache2.start();
assertTrue("Cache1 is still coordinator", cache1.getRPCManager().isCoordinator());
assertFalse("Cache2 is not coordinator", cache2.getRPCManager().isCoordinator());
- final CountDownLatch latch = new CountDownLatch(1);
- ViewChangeNotifier notifier = new ViewChangeNotifier(latch);
- cache2.addCacheListener(notifier);
+ ViewChangeListener viewChangeListener = new ViewChangeListener(cache2);
cache1.stop();
// wait till cache2 gets the view change notification
- boolean viewChangeReceived = latch.await(60, TimeUnit.SECONDS);
- assert viewChangeReceived : "Should have received a view change!";
+ assert viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS) : "Should have received a view change!";
assertTrue("Cache2 is coordinator", cache2.getRPCManager().isCoordinator());
}
-
- @CacheListener
- public static class ViewChangeNotifier
- {
- CountDownLatch latch;
-
- public ViewChangeNotifier(CountDownLatch latch)
- {
- this.latch = latch;
- }
-
- @ViewChanged
- public void handleViewChange(ViewChangedEvent e)
- {
- if (!e.isPre()) latch.countDown();
- }
- }
-
}
\ No newline at end of file
Modified: core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java 2008-04-29 13:12:43 UTC (rev 5749)
+++ core/trunk/src/test/java/org/jboss/cache/loader/SingletonStoreCacheLoaderTest.java 2008-04-29 13:27:54 UTC (rev 5750)
@@ -15,6 +15,7 @@
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
+import org.jboss.cache.misc.ViewChangeListener;
import org.jboss.cache.xml.XmlHelper;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
@@ -36,7 +37,7 @@
*
* @author <a href="mailto:galder.zamarreno@jboss.com">Galder Zamarreno</a>
*/
-@Test(groups = {"functional"})
+@Test(groups = "functional")
public class SingletonStoreCacheLoaderTest extends AbstractCacheLoaderTestBase
{
private static final Log log = LogFactory.getLog(SingletonStoreCacheLoaderTest.class);
@@ -146,8 +147,10 @@
assertFalse(cl3.exists(fqn("/e")));
assertFalse(cl3.exists(fqn("/e/f/g")));
+ ViewChangeListener viewChangeListener = new ViewChangeListener(cache2);
+
stopCache1();
- Thread.sleep(1000);
+ viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);
SingletonStoreCacheLoader scl2 = (SingletonStoreCacheLoader) cache2.getCacheLoaderManager().getCacheLoader();
waitForPushStateCompletion(scl2.getPushStateFuture());
@@ -178,8 +181,9 @@
assertFalse(cl3.exists(fqn("/e/f/h")));
assertFalse(cl3.exists(fqn("/i")));
+ viewChangeListener = new ViewChangeListener(cache3);
stopCache2();
- Thread.sleep(1000);
+ viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);
SingletonStoreCacheLoader scl3 = (SingletonStoreCacheLoader) cache3.getCacheLoaderManager().getCacheLoader();
waitForPushStateCompletion(scl3.getPushStateFuture());
@@ -271,9 +275,7 @@
return new ActiveStatusModifier(mscl);
}
- protected CacheLoaderConfig getSingletonStoreCacheLoaderConfig(String cacheloaderClass, boolean singletonEnabled,
- boolean pushStateWhenCoordinator,
- int pushStateWhenCoordinatorTimeout) throws Exception
+ protected CacheLoaderConfig getSingletonStoreCacheLoaderConfig(String cacheloaderClass) throws Exception
{
String xml = "<config>\n" +
"<passivation>false</passivation>\n" +
@@ -297,13 +299,13 @@
private void initSingletonNonPushCache(CacheSPI cache) throws Exception
{
cache.getConfiguration().setCacheLoaderConfig(getSingletonStoreCacheLoaderConfig(
- DummyInMemoryCacheLoader.class.getName(), true, false, 1000));
+ DummyInMemoryCacheLoader.class.getName()));
}
private void initSingletonWithPushCache(CacheSPI cache) throws Exception
{
cache.getConfiguration().setCacheLoaderConfig(getSingletonStoreCacheLoaderConfig(
- DummyInMemoryCacheLoader.class.getName(), true, true, 1000));
+ DummyInMemoryCacheLoader.class.getName()));
}
private CacheLoader getDelegatingCacheLoader(CacheSPI cache)
Added: core/trunk/src/test/java/org/jboss/cache/misc/ViewChangeListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/misc/ViewChangeListener.java (rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/misc/ViewChangeListener.java 2008-04-29 13:27:54 UTC (rev 5750)
@@ -0,0 +1,55 @@
+package org.jboss.cache.misc;
+
+import org.jboss.cache.Cache;
+import org.jboss.cache.notifications.annotation.CacheListener;
+import org.jboss.cache.notifications.annotation.ViewChanged;
+import org.jboss.cache.notifications.event.ViewChangedEvent;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * A class that registers a cache listener with a given cache, and waits for a view change on the cache.
+ * <p/>
+ * Sample usage:
+ * <pre>
+ * Cache c = getCache();
+ * ViewChangeListener vcl = new ViewChangeListener(c);
+ * assert vcl.waitForViewChange(60, TimeUnit.SECONDS); // will block for up to 60 seconds for a view change on cache c
+ * </pre>
+ */
+@CacheListener
+public class ViewChangeListener
+{
+ CountDownLatch latch;
+
+ /**
+ * Constructs a view change listener
+ *
+ * @param cache cache to listen on for view change events
+ */
+ public ViewChangeListener(Cache cache)
+ {
+ this.latch = new CountDownLatch(1);
+ cache.addCacheListener(this);
+ }
+
+ @ViewChanged
+ public void handleViewChange(ViewChangedEvent e)
+ {
+ if (!e.isPre()) latch.countDown();
+ }
+
+ /**
+ * Waits for up to millis milliseconds for a view change to be received.
+ *
+ * @param timeout length of time to wait for a view change
+ * @param unit time unit to use
+ * @return true if a view change is received, false otherwise.
+ * @throws InterruptedException
+ */
+ public boolean waitForViewChange(long timeout, TimeUnit unit) throws InterruptedException
+ {
+ return latch.await(timeout, unit);
+ }
+}
\ No newline at end of file
16 years, 8 months
JBoss Cache SVN: r5749 - core/trunk/src/main/java/org/jboss/cache/loader/bdbje.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-29 09:12:43 -0400 (Tue, 29 Apr 2008)
New Revision: 5749
Modified:
core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java
Log:
JE environment to adhere to cache-wide lock acquisition timeouts
Modified: core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java 2008-04-29 13:06:47 UTC (rev 5748)
+++ core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java 2008-04-29 13:12:43 UTC (rev 5749)
@@ -159,6 +159,7 @@
EnvironmentConfig envConfig = new EnvironmentConfig();
envConfig.setAllowCreate(true);
envConfig.setTransactional(true);
+ envConfig.setLockTimeout(cache.getConfiguration().getLockAcquisitionTimeout());
if (log.isTraceEnabled()) log.trace("Creating JE environment with home dir " + homeDir);
env = new Environment(homeDir, envConfig);
if (log.isDebugEnabled()) log.debug("Created JE environment " + env + " for cache loader " + this);
16 years, 8 months
JBoss Cache SVN: r5748 - core/trunk/src/test/java/org/jboss/cache/api.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-29 09:06:47 -0400 (Tue, 29 Apr 2008)
New Revision: 5748
Modified:
core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java
Log:
Improved to listen for view change notification before asserting whether coordinator has changed.
Modified: core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java 2008-04-29 13:04:49 UTC (rev 5747)
+++ core/trunk/src/test/java/org/jboss/cache/api/CacheSPITest.java 2008-04-29 13:06:47 UTC (rev 5748)
@@ -6,14 +6,19 @@
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.notifications.annotation.CacheListener;
+import org.jboss.cache.notifications.annotation.ViewChanged;
+import org.jboss.cache.notifications.event.ViewChangedEvent;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
-@Test(groups = {"functional"})
+@Test(groups = "functional")
public class CacheSPITest
{
private CacheSPI<Object, Object> cache1;
@@ -98,9 +103,31 @@
cache2.start();
assertTrue("Cache1 is still coordinator", cache1.getRPCManager().isCoordinator());
assertFalse("Cache2 is not coordinator", cache2.getRPCManager().isCoordinator());
-
+ final CountDownLatch latch = new CountDownLatch(1);
+ ViewChangeNotifier notifier = new ViewChangeNotifier(latch);
+ cache2.addCacheListener(notifier);
cache1.stop();
+ // wait till cache2 gets the view change notification
+ boolean viewChangeReceived = latch.await(60, TimeUnit.SECONDS);
+ assert viewChangeReceived : "Should have received a view change!";
assertTrue("Cache2 is coordinator", cache2.getRPCManager().isCoordinator());
+ }
+ @CacheListener
+ public static class ViewChangeNotifier
+ {
+ CountDownLatch latch;
+
+ public ViewChangeNotifier(CountDownLatch latch)
+ {
+ this.latch = latch;
+ }
+
+ @ViewChanged
+ public void handleViewChange(ViewChangedEvent e)
+ {
+ if (!e.isPre()) latch.countDown();
+ }
}
+
}
\ No newline at end of file
16 years, 8 months
JBoss Cache SVN: r5747 - in benchmarks/benchmark-fwk/trunk: cache-products and 7 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-29 09:04:49 -0400 (Tue, 29 Apr 2008)
New Revision: 5747
Added:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async-br.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync-br.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async-br.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync-br.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync.xml
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jboss-common-core-2.2.3.GA.jar
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jboss-javaee-5.0.0.Beta3.jar
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jbosscache-core.jar
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jcip-annotations-1.0.jar
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jgroups-2.6.2.jar
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java
Modified:
benchmarks/benchmark-fwk/trunk/build.xml
Log:
added 2.2.0 bench support
Modified: benchmarks/benchmark-fwk/trunk/build.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/build.xml 2008-04-29 12:54:33 UTC (rev 5746)
+++ benchmarks/benchmark-fwk/trunk/build.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -430,6 +430,7 @@
<dirname property="module.jbosscache200-plugin.basedir" file="${ant.file}"/>
<dirname property="module.jbosscache210-plugin.basedir" file="${ant.file}"/>
+ <dirname property="module.jbosscache220-plugin.basedir" file="${ant.file}"/>
<property name="compiler.args.jbosscache200-plugin" value="${compiler.args}"/>
@@ -438,6 +439,8 @@
value="${module.jbosscache200-plugin.basedir}/classes/production/jbosscache-2.0.0"/>
<property name="jbosscache210-plugin.output.dir"
value="${module.jbosscache210-plugin.basedir}/classes/production/jbosscache-2.1.0"/>
+ <property name="jbosscache220-plugin.output.dir"
+ value="${module.jbosscache220-plugin.basedir}/classes/production/jbosscache-2.2.0"/>
<property name="jbosscache200-plugin.testoutput.dir"
value="${module.jbosscache200-plugin.basedir}/classes/test/jbosscache-2.0.0"/>
@@ -461,6 +464,14 @@
<pathelement location="${framework.testoutput.dir}"/>
<pathelement location="${jbosscache210-plugin.output.dir}"/>
</path>
+
+ <path id="jbosscache220-plugin.module.classpath">
+ <fileset dir="${module.jbosscache220-plugin.basedir}/cache-products/jbosscache-2.2.0/lib" includes="*.jar"/>
+ <pathelement location="${module.framework.basedir}/lib/commons-logging.jar"/>
+ <pathelement location="${framework.output.dir}"/>
+ <pathelement location="${framework.testoutput.dir}"/>
+ <pathelement location="${jbosscache220-plugin.output.dir}"/>
+ </path>
<patternset id="excluded.from.module.jbosscache200-plugin">
@@ -513,6 +524,17 @@
</javac>
</target>
+ <target name="compile.module.jbosscache220-plugin.production" depends="compile.module.framework"
+ description="Compile module jbosscache-2.2.0; production classes">
+ <mkdir dir="${jbosscache220-plugin.output.dir}"/>
+ <javac destdir="${jbosscache220-plugin.output.dir}" debug="${compiler.debug}"
+ nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
+ <compilerarg line="${compiler.args}"/>
+ <classpath refid="jbosscache220-plugin.module.classpath"/>
+ <src path="${module.jbosscache220-plugin.basedir}/cache-products/jbosscache-2.2.0"/>
+ </javac>
+ </target>
+
<target name="compile.module.jbosscache200-plugin.tests" depends="compile.module.jbosscache200-plugin.production"
description="compile module jbosscache-2.0.0; test classes" unless="skip.tests"/>
@@ -526,7 +548,7 @@
</target>
<target name="all"
- depends="init, clean, compile.module.framework, compile.module.jbosscache140-plugin, compile.module.jbosscache200-plugin, compile.module.jbosscache210-plugin.production, compile.module.terracotta-plugin"
+ depends="init, clean, compile.module.framework, compile.module.jbosscache140-plugin, compile.module.jbosscache200-plugin, compile.module.jbosscache210-plugin.production, compile.module.jbosscache220-plugin.production, compile.module.terracotta-plugin"
description="build all"/>
<target name="checkClusterAddresses" depends="compile.module.framework.production"
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async-br.xml (from rev 5742, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/opt-repl-async-br.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async-br.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async-br.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample TreeCache Service Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+ <attribute name="NodeLockingScheme">Optimistic</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+This configuration is dependent on the JGroups multiplexer being
+registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <TCP recv_buf_size="20000000" use_send_queues="false"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ enable_unicast_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="4"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="2"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <!--<PING timeout="2000" num_initial_members="3"/>-->
+ <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ <!-- Buddy Replication config -->
+ <attribute name="BuddyReplicationConfig">
+ <config>
+ <buddyReplicationEnabled>true</buddyReplicationEnabled>
+ <!-- these are the default values anyway -->
+ <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
+ <!-- numBuddies is the number of backup nodes each node maintains. ignoreColocatedBuddies means that
+ each node will *try* to select a buddy on a different physical host. If not able to do so though,
+ it will fall back to colocated nodes. -->
+ <buddyLocatorProperties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </buddyLocatorProperties>
+
+ <!-- A way to specify a preferred replication group. If specified, we try and pick a buddy why shares
+ the same pool name (falling back to other buddies if not available). This allows the sysdmin to hint at
+ backup buddies are picked, so for example, nodes may be hinted topick buddies on a different physical rack
+ or power supply for added fault tolerance. -->
+ <buddyPoolName>myBuddyPoolReplicationGroup</buddyPoolName>
+ <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
+ from groups -->
+ <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
+
+ <!-- the following three elements, all relating to data gravitation, default to false -->
+ <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
+If false, data will only be gravitated if an Option is set enabling it -->
+ <autoDataGravitation>false</autoDataGravitation>
+ <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
+ <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+ <!-- search backup subtrees as well for data when gravitating. Results in backup nodes being able to
+ answer data gravitation requests. -->
+ <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+ </config>
+ </attribute>
+ </mbean>
+
+
+</server>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async.xml (from rev 5742, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/opt-repl-async.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-async.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample for total replication. -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <attribute name="NodeLockingScheme">Optimistic</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+ This configuration is dependent on the JGroups multiplexer being
+ registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <UDP mcast_addr="228.10.10.10"
+ mcast_port="45588"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="2"
+ enable_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="10"
+ thread_pool.rejection_policy="Run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="true"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK
+ use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ </mbean>
+</server>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync-br.xml (from rev 5742, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/opt-repl-sync-br.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync-br.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync-br.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample TreeCache Service Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <attribute name="NodeLockingScheme">Optimistic</attribute>
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_SYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+This configuration is dependent on the JGroups multiplexer being
+registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <TCP recv_buf_size="20000000" use_send_queues="false"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ enable_unicast_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="4"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="2"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <!--<PING timeout="2000" num_initial_members="3"/>-->
+ <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ <!-- Buddy Replication config -->
+ <attribute name="BuddyReplicationConfig">
+ <config>
+ <buddyReplicationEnabled>true</buddyReplicationEnabled>
+ <!-- these are the default values anyway -->
+ <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
+ <!-- numBuddies is the number of backup nodes each node maintains. ignoreColocatedBuddies means that
+ each node will *try* to select a buddy on a different physical host. If not able to do so though,
+ it will fall back to colocated nodes. -->
+ <buddyLocatorProperties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </buddyLocatorProperties>
+
+ <!-- A way to specify a preferred replication group. If specified, we try and pick a buddy why shares
+ the same pool name (falling back to other buddies if not available). This allows the sysdmin to hint at
+ backup buddies are picked, so for example, nodes may be hinted topick buddies on a different physical rack
+ or power supply for added fault tolerance. -->
+ <buddyPoolName>myBuddyPoolReplicationGroup</buddyPoolName>
+ <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
+ from groups -->
+ <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
+
+ <!-- the following three elements, all relating to data gravitation, default to false -->
+ <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
+If false, data will only be gravitated if an Option is set enabling it -->
+ <autoDataGravitation>false</autoDataGravitation>
+ <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
+ <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+ <!-- search backup subtrees as well for data when gravitating. Results in backup nodes being able to
+ answer data gravitation requests. -->
+ <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+ </config>
+ </attribute>
+ </mbean>
+
+
+</server>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync.xml (from rev 5742, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/opt-repl-sync.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/opt-repl-sync.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample for total replication. -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <attribute name="NodeLockingScheme">Optimistic</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_SYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+ This configuration is dependent on the JGroups multiplexer being
+ registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <UDP mcast_addr="228.10.10.10"
+ mcast_port="45588"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="2"
+ enable_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="10"
+ thread_pool.rejection_policy="Run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="true"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK
+ use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ </mbean>
+</server>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async-br.xml (from rev 5741, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-async-br.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async-br.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async-br.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample TreeCache Service Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <!--
+ Node locking level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+This configuration is dependent on the JGroups multiplexer being
+registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <TCP recv_buf_size="20000000" use_send_queues="false"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ enable_unicast_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="4"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="2"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <!--<PING timeout="2000" num_initial_members="3"/>-->
+ <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ <!-- Buddy Replication config -->
+ <attribute name="BuddyReplicationConfig">
+ <config>
+ <buddyReplicationEnabled>true</buddyReplicationEnabled>
+ <!-- these are the default values anyway -->
+ <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
+ <!-- numBuddies is the number of backup nodes each node maintains. ignoreColocatedBuddies means that
+ each node will *try* to select a buddy on a different physical host. If not able to do so though,
+ it will fall back to colocated nodes. -->
+ <buddyLocatorProperties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </buddyLocatorProperties>
+
+ <!-- A way to specify a preferred replication group. If specified, we try and pick a buddy why shares
+ the same pool name (falling back to other buddies if not available). This allows the sysdmin to hint at
+ backup buddies are picked, so for example, nodes may be hinted topick buddies on a different physical rack
+ or power supply for added fault tolerance. -->
+ <buddyPoolName>myBuddyPoolReplicationGroup</buddyPoolName>
+ <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
+ from groups -->
+ <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
+
+ <!-- the following three elements, all relating to data gravitation, default to false -->
+ <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
+If false, data will only be gravitated if an Option is set enabling it -->
+ <autoDataGravitation>false</autoDataGravitation>
+ <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
+ <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+ <!-- search backup subtrees as well for data when gravitating. Results in backup nodes being able to
+ answer data gravitation requests. -->
+ <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+ </config>
+ </attribute>
+ </mbean>
+
+
+</server>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async.xml (from rev 5742, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-async.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-async.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample for total replication. -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <!--
+ Node locking level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+ This configuration is dependent on the JGroups multiplexer being
+ registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <UDP mcast_addr="228.10.10.10"
+ mcast_port="45588"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="2"
+ enable_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="10"
+ thread_pool.rejection_policy="Run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="true"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK
+ use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ </mbean>
+</server>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync-br.xml (from rev 5741, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-sync-br.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync-br.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync-br.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample TreeCache Service Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <!--
+ Node locking level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_SYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+This configuration is dependent on the JGroups multiplexer being
+registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <TCP recv_buf_size="20000000" use_send_queues="false"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="false"
+ enable_unicast_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="4"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="2"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <!--<PING timeout="2000" num_initial_members="3"/>-->
+ <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ <!-- Buddy Replication config -->
+ <attribute name="BuddyReplicationConfig">
+ <config>
+ <buddyReplicationEnabled>true</buddyReplicationEnabled>
+ <!-- these are the default values anyway -->
+ <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
+ <!-- numBuddies is the number of backup nodes each node maintains. ignoreColocatedBuddies means that
+ each node will *try* to select a buddy on a different physical host. If not able to do so though,
+ it will fall back to colocated nodes. -->
+ <buddyLocatorProperties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </buddyLocatorProperties>
+
+ <!-- A way to specify a preferred replication group. If specified, we try and pick a buddy why shares
+ the same pool name (falling back to other buddies if not available). This allows the sysdmin to hint at
+ backup buddies are picked, so for example, nodes may be hinted topick buddies on a different physical rack
+ or power supply for added fault tolerance. -->
+ <buddyPoolName>myBuddyPoolReplicationGroup</buddyPoolName>
+ <!-- communication timeout for inter-buddy group organisation messages (such as assigning to and removing
+ from groups -->
+ <buddyCommunicationTimeout>2000</buddyCommunicationTimeout>
+
+ <!-- the following three elements, all relating to data gravitation, default to false -->
+ <!-- Should data gravitation be attempted whenever there is a cache miss on finding a node?
+If false, data will only be gravitated if an Option is set enabling it -->
+ <autoDataGravitation>false</autoDataGravitation>
+ <!-- removes data on remote caches' trees and backup subtrees when gravitated to a new data owner -->
+ <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+ <!-- search backup subtrees as well for data when gravitating. Results in backup nodes being able to
+ answer data gravitation requests. -->
+ <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+ </config>
+ </attribute>
+ </mbean>
+
+
+</server>
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync.xml (from rev 5742, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-sync.xml)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync.xml (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/conf/pess-repl-sync.xml 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample for total replication. -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
+
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <!--
+ Node locking level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">REPL_SYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+ This configuration is dependent on the JGroups multiplexer being
+ registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+ <!-- JGroups protocol stack properties.
+ ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
+ -->
+ <attribute name="ClusterConfig">
+ <config>
+ <UDP mcast_addr="228.10.10.10"
+ mcast_port="45588"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="2"
+ enable_bundling="false"
+ enable_diagnostics="false"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="10"
+ thread_pool.rejection_policy="Run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="true"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK
+ use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">15000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">10000</attribute>
+
+
+ </mbean>
+</server>
Added: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/config.sh 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+#see "$CACHE_ROOT/cache-products/cache.sh" for details
+
+THIS_DIR="./cache-products/jbosscache-2.2.0"
+
+#setting up classpath
+for JAR in $THIS_DIR/lib/*
+do
+ CLASSPATH=$CLASSPATH:$JAR
+done
+
+CLASSPATH="$CLASSPATH:./classes/production/jbosscache-2.2.0"
+CLASSPATH="$CLASSPATH:$THIS_DIR/conf"
+#--classpath was set
+
+#additional JVM options
+JVM_OPTIONS="$JVM_OPTIONS -Xmx1024m -Djava.net.preferIPv4Stack=true" JVM_OPTIONS="$JVM_OPTIONS -DcacheBenchFwk.cacheWrapperClassName=org.cachebench.cachewrappers.JBossCache220Wrapper"
\ No newline at end of file
Added: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jboss-common-core-2.2.3.GA.jar
===================================================================
(Binary files differ)
Property changes on: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jboss-common-core-2.2.3.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jboss-javaee-5.0.0.Beta3.jar
===================================================================
(Binary files differ)
Property changes on: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jboss-javaee-5.0.0.Beta3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jbosscache-core.jar
===================================================================
(Binary files differ)
Property changes on: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jbosscache-core.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jcip-annotations-1.0.jar
===================================================================
(Binary files differ)
Property changes on: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jcip-annotations-1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jgroups-2.6.2.jar
===================================================================
(Binary files differ)
Property changes on: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/lib/jgroups-2.6.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java (from rev 5409, benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/src/org/cachebench/cachewrappers/JBossCache210Wrapper.java)
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.2.0/src/org/cachebench/cachewrappers/JBossCache220Wrapper.java 2008-04-29 13:04:49 UTC (rev 5747)
@@ -0,0 +1,83 @@
+package org.cachebench.cachewrappers;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.cachebench.CacheWrapper;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.buddyreplication.GravitateResult;
+import org.jboss.cache.marshall.NodeData;
+
+import java.util.Map;
+
+/**
+ * @author Mircea.Markus(a)jboss.com
+ * @since 2.2
+ */
+public class JBossCache220Wrapper implements CacheWrapper
+{
+ private Cache cache;
+ private Log log = LogFactory.getLog(JBossCache220Wrapper.class);
+
+ public void init(Map parameters) throws Exception
+ {
+ log.info("Creating cache with the following configuration: " + parameters);
+ cache = DefaultCacheFactory.getInstance().createCache((String)parameters.get("config"));
+ log.info("Running cache with following config: " + cache.getConfiguration());
+ log.info("Running follwing JBossCacheVersion: " + org.jboss.cache.Version.version);
+ log.info("Running follwing JBossCacheCodeName: " + org.jboss.cache.Version.codename);
+ }
+
+ public void setUp() throws Exception
+ {
+ }
+
+ public void tearDown() throws Exception
+ {
+ cache.stop();
+ }
+
+ public void put(Object key, Object value) throws Exception
+ {
+ // make sure the threads don't conflict!
+ Fqn f = new Fqn("test", key);
+ cache.put(f, key, value);
+ }
+
+ public Object get(Object key) throws Exception
+ {
+ Fqn f = new Fqn("test", key);
+ return cache.get(f, key);
+ }
+
+ public void empty() throws Exception
+ {
+ //not removing root because there it fails with buddy replication: http://jira.jboss.com/jira/browse/JBCACHE-1241
+ cache.removeNode(new Fqn("test"));
+ }
+
+ public int getNumMembers()
+ {
+ return cache.getMembers().size();
+ }
+
+ public String getInfo()
+ {
+ return "Num direct children: " + cache.getRoot().getChildren().size();
+ }
+
+ public Object getReplicatedData(String key) throws Exception
+ {
+ CacheSPI cacheSpi = (CacheSPI) cache;
+ GravitateResult result = cacheSpi.gravitateData(new Fqn("test", key), true, null);
+ if (!result.isDataFound())
+ {
+ //totall replication?
+ return get(key);
+ }
+ NodeData nodeData = result.getNodeData().get(0);
+ return nodeData.getAttributes().get(key);
+ }
+}
16 years, 8 months
JBoss Cache SVN: r5746 - in core/trunk/src: main/java/org/jboss/cache/commands/write and 2 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-29 08:54:33 -0400 (Tue, 29 Apr 2008)
New Revision: 5746
Modified:
core/trunk/src/main/java/org/jboss/cache/DataContainer.java
core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.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/PassivationInterceptor.java
core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
Log:
Fixed recursive evicts with passivation
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-04-29 11:35:15 UTC (rev 5745)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainer.java 2008-04-29 12:54:33 UTC (rev 5746)
@@ -280,7 +280,7 @@
buildNodesForEviction(node, result);
}
- private void buildNodesForEviction(Node node, List<Fqn> nodes)
+ private void buildNodesForEviction(NodeSPI node, List<Fqn> nodes)
{
if (node == null || node.isResident())
{
@@ -289,7 +289,7 @@
Fqn fqn = node.getFqn();
if (fqn.isRoot())
{
- for (Object childName : node.getChildrenNames())
+ for (Object childName : node.getChildrenNamesDirect())
{
if (!node.isResident()) nodes.add(Fqn.fromRelativeElements(fqn, childName));
}
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-29 11:35:15 UTC (rev 5745)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/MoveCommand.java 2008-04-29 12:54:33 UTC (rev 5746)
@@ -1,5 +1,7 @@
package org.jboss.cache.commands.write;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.NodeNotExistsException;
@@ -17,9 +19,12 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+// TODO: 2.2.0: Make sure this is properly intercepted, i.e., locked and loaded!!
public class MoveCommand extends AbstractDataCommand implements ReversibleCommand
{
public static final int METHOD_ID = 36;
+ private static final Log log = LogFactory.getLog(MoveCommand.class);
+ private static boolean trace;
/* params */
private Fqn to;
@@ -30,6 +35,7 @@
public void injectNotifier(Notifier notifier)
{
this.notifier = notifier;
+ trace = log.isTraceEnabled();
}
public MoveCommand()
@@ -92,6 +98,8 @@
throw new NodeNotExistsException("Node " + nodeToMoveFqn + " does not exist when attempting to move node!!");
}
+ if (trace) log.trace("Moving " + fqn + " to sit under " + to);
+
NodeSPI oldParent = node.getParent();
Object nodeName = nodeToMoveFqn.getLastElement();
@@ -162,7 +170,7 @@
{
return "MoveCommand{" +
"fqn=" + fqn +
- "to=" + to +
+ ", to=" + to +
'}';
}
}
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-29 11:35:15 UTC (rev 5745)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java 2008-04-29 12:54:33 UTC (rev 5746)
@@ -11,6 +11,7 @@
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
+import org.jboss.cache.commands.write.MoveCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
@@ -146,6 +147,19 @@
return returnValue;
}
+ @Override
+ public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ {
+ Object returnValue = super.visitMoveCommand(ctx, command);
+ if (trace)
+ log.trace("This is a move operation; removing the FROM node from the loader, no activation processing needed.");
+ loader.remove(command.getFqn());
+ removeNodeFromCacheLoader(ctx, command.getFqn().getParent());
+ removeNodeFromCacheLoader(ctx, command.getTo());
+ return returnValue;
+ }
+
+
/**
* Remove the node from the cache loader if it exists in memory,
* its attributes have been initialized, its children have been loaded,
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-29 11:35:15 UTC (rev 5745)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-04-29 12:54:33 UTC (rev 5746)
@@ -240,7 +240,7 @@
{
NodeSPI n = dataContainer.peek(fqn, true, true);
- boolean mustLoad = mustLoad(n, key, allKeys);
+ boolean mustLoad = mustLoad(n, key, allKeys || isMove);
if (trace)
{
log.trace("load element " + fqn + " mustLoad=" + mustLoad);
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-29 11:35:15 UTC (rev 5745)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java 2008-04-29 12:54:33 UTC (rev 5746)
@@ -14,6 +14,7 @@
import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
@@ -49,9 +50,29 @@
* store using the CacheLoader.
*/
@Override
- public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand evictFqnCommand) throws Throwable
+ public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
{
- Fqn fqn = evictFqnCommand.getFqn();
+ if (command.isRecursive())
+ {
+ List<Fqn> fqnsToEvict = dataContainer.getNodesForEviction(command.getFqn(), true);
+ if (fqnsToEvict != null)
+ {
+ for (Fqn f : fqnsToEvict)
+ {
+ passivate(ctx, f);
+ }
+ }
+ }
+ else
+ {
+ passivate(ctx, command.getFqn());
+ }
+
+ return invokeNextInterceptor(ctx, command);
+ }
+
+ private void passivate(InvocationContext ctx, Fqn fqn) throws Throwable
+ {
try
{
// evict method local doesn't hold attributes therefore we have
@@ -59,6 +80,7 @@
Map attributes = getNodeAttributes(ctx, fqn);
// notify listeners that this node is about to be passivated
notifier.notifyNodePassivated(fqn, true, attributes, ctx);
+ if (trace) log.trace("Passivating " + fqn);
loader.put(fqn, attributes);
notifier.notifyNodePassivated(fqn, false, Collections.emptyMap(), ctx);
if (getStatisticsEnabled() && configuration.getExposeManagementStatistics())
@@ -73,10 +95,8 @@
log.trace("Node " + fqn + " not loaded in memory; passivation skipped");
}
}
- return invokeNextInterceptor(ctx, evictFqnCommand);
}
-
public long getPassivations()
{
return passivations.get();
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-29 11:35:15 UTC (rev 5745)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-04-29 12:54:33 UTC (rev 5746)
@@ -312,12 +312,7 @@
nodeD.put(k, vD);
nodeE = nodeD.addChild(E);
nodeE.put(k, vE);
- cache.evict(Fqn.ROOT);
- cache.evict(A);
- cache.evict(B);
- cache.evict(C);
- cache.evict(D);
- cache.evict(E);
+ cache.evict(Fqn.ROOT, true);
// move
if (useTx) tm.begin();
@@ -352,15 +347,7 @@
assertEquals(nodeD, nodeE.getParent());
- if (pasv)
- {
- cache.evict(Fqn.ROOT);
- cache.evict(nodeA.getFqn());
- cache.evict(nodeB.getFqn());
- cache.evict(nodeC.getFqn());
- cache.evict(nodeD.getFqn());
- cache.evict(nodeE.getFqn());
- }
+ if (pasv) cache.evict(Fqn.ROOT, true);
//now inspect the loader.
assertEquals(vA, loader.get(nodeA.getFqn()).get(k));
16 years, 8 months
JBoss Cache SVN: r5745 - in benchmarks/benchmark-fwk/trunk/src/org/cachebench: warmup and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-29 07:35:15 -0400 (Tue, 29 Apr 2008)
New Revision: 5745
Modified:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java
Log:
updated tests to avoid throwablesto break the flow
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java 2008-04-29 11:04:31 UTC (rev 5744)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/tests/SessionSimulatorTest.java 2008-04-29 11:35:15 UTC (rev 5745)
@@ -90,9 +90,9 @@
buf = (byte[]) cacheWrapper.get(getSessionEntry(randomAttribute));
totalBytesRead += buf.length;
reads++;
- } catch (Exception e)
+ } catch (Throwable e)
{
- log.trace("Error appeared whilst reading from cache:" + e.getMessage());
+ log.warn("Error appeared whilst reading from cache:" + e.getMessage());
}
} else
{ // write
@@ -102,9 +102,9 @@
cacheWrapper.put(getSessionEntry(randomAttribute), buf);
totalBytesWritten += buf.length;
writes++;
- } catch (Exception e)
+ } catch (Throwable e)
{
- log.trace("Error appeared whilst writing to cache:" + e.getMessage());
+ log.warn("Error appeared whilst writing to cache:" + e.getMessage());
}
}
}
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java 2008-04-29 11:04:31 UTC (rev 5744)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java 2008-04-29 11:35:15 UTC (rev 5745)
@@ -23,7 +23,7 @@
try
{
wrapper.put(String.valueOf(opCount), String.valueOf(opCount));
- } catch (Exception e)
+ } catch (Throwable e)
{
log.warn("Exception on cache warmup", e);
}
16 years, 8 months
JBoss Cache SVN: r5744 - core/trunk/src/main/java/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-29 07:04:31 -0400 (Tue, 29 Apr 2008)
New Revision: 5744
Modified:
core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
core/trunk/src/main/java/org/jboss/cache/VersionedNode.java
Log:
Optimistic nodes should ignore isolation level
Modified: core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-04-29 11:04:05 UTC (rev 5743)
+++ core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-04-29 11:04:31 UTC (rev 5744)
@@ -47,7 +47,7 @@
* Lock manager that manages locks to be acquired when accessing the node inside a transaction. Lazy set just in case
* locking is not needed.
*/
- private transient IdentityLock lock_ = null;
+ protected transient IdentityLock lock_ = null;
/**
* A reference of the CacheImpl instance.
@@ -60,7 +60,7 @@
*/
private final Map data = new HashMap();
- private NodeSPI delegate;
+ protected NodeSPI delegate;
private CommandsFactory commandsFactory;
/**
@@ -145,7 +145,7 @@
return cache.peek(fqn.getParent(), true);
}
- private synchronized void initLock()
+ protected synchronized void initLock()
{
if (lock_ == null)
{
Modified: core/trunk/src/main/java/org/jboss/cache/VersionedNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/VersionedNode.java 2008-04-29 11:04:05 UTC (rev 5743)
+++ core/trunk/src/main/java/org/jboss/cache/VersionedNode.java 2008-04-29 11:04:31 UTC (rev 5744)
@@ -7,6 +7,8 @@
package org.jboss.cache;
import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.lock.IdentityLock;
+import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.optimistic.DataVersion;
import org.jboss.cache.optimistic.DefaultDataVersion;
@@ -76,7 +78,16 @@
this.version = version;
}
+ /**
+ * Optimistically locked nodes (VersionedNodes) will always use repeatable read.
+ */
@Override
+ protected synchronized void initLock()
+ {
+ if (lock_ == null) lock_ = new IdentityLock(IsolationLevel.REPEATABLE_READ, delegate);
+ }
+
+ @Override
public Map getInternalState(boolean onlyInternalState)
{
Map state = super.getInternalState(onlyInternalState);
16 years, 8 months