[jbosscache-commits] JBoss Cache SVN: r5916 - in core/trunk/src: test/java/org/jboss/cache/util/internals and 1 other directory.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu May 29 09:56:53 EDT 2008


Author: mircea.markus
Date: 2008-05-29 09:56:53 -0400 (Thu, 29 May 2008)
New Revision: 5916

Modified:
   core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java
   core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
   core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
   core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java
   core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java
   core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
   core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
Log:
JBCACHE-1338 - changes after code review

Modified: core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java	2008-05-29 13:51:25 UTC (rev 5915)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/AbstractMarshaller.java	2008-05-29 13:56:53 UTC (rev 5916)
@@ -104,7 +104,7 @@
       throw new RuntimeException("Needs to be overridden!");
    }
 
-   public RegionalizedMethodCall regionalizedCommandFromByteBuffer(byte[] buffer) throws Exception
+   public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer) throws Exception
    {
       throw new RuntimeException("Needs to be overridden!");
    }

Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java	2008-05-29 13:51:25 UTC (rev 5915)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java	2008-05-29 13:56:53 UTC (rev 5916)
@@ -35,11 +35,11 @@
    protected ComponentRegistry componentRegistry;
    protected boolean trace;
 
-   public CommandAwareRpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj,
+   public CommandAwareRpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object serverObj,
                                     InvocationContextContainer container, InterceptorChain interceptorChain,
                                     ComponentRegistry componentRegistry)
    {
-      super(channel, l, l2, server_obj);
+      super(channel, l, l2, serverObj);
       this.invocationContextContainer = container;
       this.componentRegistry = componentRegistry;
       this.interceptorChain = interceptorChain;
@@ -179,19 +179,4 @@
    {
       return getClass().getSimpleName() + "[Outgoing marshaller: " + req_marshaller + "; incoming marshaller: " + rsp_marshaller + "]";
    }
-
-   public InvocationContextContainer getInvocationContextContainer()
-   {
-      return invocationContextContainer;
-   }
-
-   public InterceptorChain getInterceptorChain()
-   {
-      return interceptorChain;
-   }
-
-   public ComponentRegistry getComponentRegistry()
-   {
-      return componentRegistry;
-   }
 }

Modified: core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java	2008-05-29 13:51:25 UTC (rev 5915)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java	2008-05-29 13:56:53 UTC (rev 5916)
@@ -53,7 +53,7 @@
          try
          {
             // we will ALWAYS be using the marshaller to unmarshall requests.
-            rmc = requestMarshaller.regionalizedCommandFromByteBuffer(req.getBuffer());
+            rmc = requestMarshaller.regionalizedMethodCallFromByteBuffer(req.getBuffer());
             command = rmc.command;
          }
          catch (Throwable e)

Modified: core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java	2008-05-29 13:51:25 UTC (rev 5915)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/Marshaller.java	2008-05-29 13:56:53 UTC (rev 5916)
@@ -78,7 +78,7 @@
     * @throws Exception if there are issues
     * @since 2.1.1
     */
-   RegionalizedMethodCall regionalizedCommandFromByteBuffer(byte[] buffer) throws Exception;
+   RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer) throws Exception;
 
    /**
     * Returns a RegionalizedMethodCall from an object input stream.  Only use if you <i>know</i> that the byte buffer contains a

Modified: core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java	2008-05-29 13:51:25 UTC (rev 5915)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/RegionalizedMethodCall.java	2008-05-29 13:56:53 UTC (rev 5916)
@@ -4,7 +4,7 @@
 import org.jboss.cache.commands.ReplicableCommand;
 
 /**
- * A regionalized MethodCall object, created when {@link Marshaller#regionalizedCommandFromByteBuffer(byte[])} or
+ * A regionalized MethodCall object, created when {@link Marshaller#regionalizedMethodCallFromByteBuffer(byte[])} or
  * {@link org.jboss.cache.marshall.Marshaller#regionalizedMethodCallFromObjectStream(java.io.ObjectInputStream)} is called.
  * <p/>
  * Specifically used by the {@link org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher} so that the region used to unmarshall

Modified: core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java	2008-05-29 13:51:25 UTC (rev 5915)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java	2008-05-29 13:56:53 UTC (rev 5916)
@@ -190,7 +190,7 @@
    }
 
    @Override
-   public RegionalizedMethodCall regionalizedCommandFromByteBuffer(byte[] buf) throws Exception
+   public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buf) throws Exception
    {
       Marshaller marshaller;
       int versionId;

Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java	2008-05-29 13:51:25 UTC (rev 5915)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationListener.java	2008-05-29 13:56:53 UTC (rev 5916)
@@ -31,7 +31,8 @@
  * </pre>
  * Lifecycle - after being used (i.e. waitForReplicationToOccur returns sucessfully) the object returns to the
  * non-initialized state and *can* be reused through expect-wait cycle.
- * Note:  this class might be used aswell for sync caches, though it does not really make sence using it in these scenarios
+ * <b>Note</b>:  this class might be used aswell for sync caches, e.g. a test could have subclasses which use sync and
+ * async replication
  *
  * @author Mircea.Markus at jboss.com
  * @since 2.2
@@ -104,8 +105,6 @@
    /**
     * Blocks for the elements specified through {@link #expect(Class[])} invocations to be replicated in this cache.
     * if replication does not occur in the give timeout then an exception is being thrown.
-    *
-    * @param timeoutMillis timeout in milliseconds
     */
    public void waitForReplicationToOccur(long timeoutMillis)
    {
@@ -152,6 +151,9 @@
       this.expectedCommands.addAll(Arrays.asList(expectedCommands));
    }
 
+   /**
+    * Waits untill first command is replicated.
+    */
    public void expectAny()
    {
       expect();




More information about the jbosscache-commits mailing list