Package org.jboss.cache.commands

Examples of org.jboss.cache.commands.ReplicableCommand


      }

      rman.activate(A);
      assertTrue(rman.hasRegion(A, Region.Type.MARSHALLING));

      ReplicableCommand result = (ReplicableCommand) testee.objectFromByteBuffer(callBytes);
      assertEquals("Did not get replicate method when passing" +
            " call for active node", ReplicateCommand.class, result.getClass());
   }
View Full Code Here


   public Object handle(Message req)
   {
      if (isValid(req))
      {
         RegionalizedMethodCall rmc;
         ReplicableCommand command;

         try
         {
            // we will ALWAYS be using the marshaller to unmarshall requests.
            rmc = requestMarshaller.regionalizedMethodCallFromByteBuffer(req.getBuffer());
View Full Code Here

   {
      if (isValid(req))
      {
         try
         {
            ReplicableCommand command = (ReplicableCommand) req_marshaller.objectFromByteBuffer(req.getBuffer(), req.getOffset(), req.getLength());
            Object execResult = executeCommand(command, req);
            if (log.isTraceEnabled()) log.trace("Command : " + command + " executed, result is: " + execResult);
            return execResult;
         }
         catch (Throwable x)
View Full Code Here

            callRecipients = usingBuddyReplication && !isBroadcast ? buddyManager.getBuddyAddressesAsVector() : null;
            if (trace)
               log.trace("Setting call recipients to " + callRecipients + " since the original list of recipients passed in is null.");
         }

         ReplicableCommand toCall = wrapCacheCommandInReplicateMethod ? commandsFactory.buildReplicateCommand(call) : call;

         List rsps = rpcManager.callRemoteMethods(callRecipients,
               toCall,
               sync, // is synchronised?
               timeout,
View Full Code Here

         DataVersionPopulator populator = new DataVersionPopulator(getTransactionWorkspace(ctx), command.getModifications().size());

         // visit all elements in the collection and apply the DataVersionPopulator to ensure all commands have data versions set.
         populator.visitCollection(null, command.getModifications());

         ReplicableCommand toBroadcast = commandsFactory.buildOptimisticPrepareCommand(gtx, populator.versionedCommands, command.getLocalAddress(), command.isOnePhaseCommit());

         //record the things we have possibly sent
         broadcastTxs.add(gtx);
         if (log.isDebugEnabled())
         {
View Full Code Here

      }

      rman.activate(A);
      assertTrue(rman.hasRegion(A, Region.Type.MARSHALLING));

      ReplicableCommand result = (ReplicableCommand) testee.objectFromByteBuffer(callBytes);
      assertEquals("Did not get replicate method when passing" +
            " call for active node", ReplicateCommand.class, result.getClass());
   }
View Full Code Here

            region = rrv.region;
            o = rrv.returnValue;
         }
         else if (o instanceof ReplicableCommand)
         {
            ReplicableCommand marshallableCommand = (ReplicableCommand) o;
            region = extractFqnRegion(marshallableCommand);
         }

         if (trace) log.trace("Region based call.  Using region " + region);
         objectToObjectStream(o, out, region);
View Full Code Here

         out.writeByte(MAGICNUMBER_REF);
         writeReference(out, refMap.get(o));
      }
      else if (o instanceof ReplicableCommand)
      {
         ReplicableCommand command = (ReplicableCommand) o;

         if (command.getCommandId() > -1)
         {
            out.writeByte(MAGICNUMBER_METHODCALL);
            marshallCommand(command, out, refMap);
         }
         else
View Full Code Here

   public Object handle(Message req)
   {
      if (isValid(req))
      {
         RegionalizedMethodCall rmc;
         ReplicableCommand command;

         try
         {
            // we will ALWAYS be using the marshaller to unmarshall requests.
            rmc = requestMarshaller.regionalizedMethodCallFromByteBuffer(req.getBuffer());
View Full Code Here

      void logCall(ReplicableCommand command, boolean oob)
      {
         if (command instanceof ReplicateCommand)
         {
            ReplicableCommand cmd = ((ReplicateCommand) command).getSingleModification();
            log.put(cmd.getClass(), oob);
         }
      }
View Full Code Here

TOP

Related Classes of org.jboss.cache.commands.ReplicableCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.