Package org.infinispan.commands.control

Examples of org.infinispan.commands.control.CacheViewControlCommand


      log.tracef("%s: Rolling back to cache view %d on %s, new view id is %d", cacheName, committedViewId, validTargets, newViewId);

      try {
         // it's ok to send the rollback to nodes that don't have the cache yet, they will just ignore it
         // on the other hand we *have* to send the rollback to any nodes that got the prepare
         final CacheViewControlCommand cmd = new CacheViewControlCommand(cacheName,
               CacheViewControlCommand.Type.ROLLBACK_VIEW, self, newViewId, null, committedViewId, null);
         // wait until we get all the responses, but ignore the results
         Map<Address, Response> rspList = transport.invokeRemotely(validTargets, cmd,
               ResponseMode.SYNCHRONOUS_IGNORE_LEAVERS, timeout, false, null, false);
         checkRemoteResponse(cacheName, cmd, rspList);
View Full Code Here


      validTargets.removeAll(cacheViewInfo.getPendingChanges().getLeavers());
      log.tracef("%s: Committing cache view %d on %s", cacheName, viewId, targets);

      try {
         // broadcast the command to all the members
         final CacheViewControlCommand cmd = new CacheViewControlCommand(cacheName,
               CacheViewControlCommand.Type.COMMIT_VIEW, self, viewId);
         // wait until we get all the responses, but ignore the results
         Map<Address, Response> rspList = transport.invokeRemotely(validTargets, cmd,
               ResponseMode.SYNCHRONOUS_IGNORE_LEAVERS, timeout, false, null, false);
         checkRemoteResponse(cacheName, cmd, rspList);
View Full Code Here

         recoveryInfo = new HashMap<Address, Map<String, CacheView>>();
         // first get the local views
         recoveryInfo.put(self, handleRecoverViews());

         // then broadcast the recover command to all the members
         CacheViewControlCommand cmd = new CacheViewControlCommand(
               DUMMY_CACHE_NAME_FOR_GLOBAL_COMMANDS, CacheViewControlCommand.Type.RECOVER_VIEW, self);
         Map<Address, Response> rspList = transport.invokeRemotely(null, cmd,
               ResponseMode.SYNCHRONOUS_IGNORE_LEAVERS, timeout, true, null, false);
         checkRemoteResponse(null, cmd, rspList);
         for (Map.Entry<Address, Response> e : rspList.entrySet()) {
View Full Code Here

               break;
            case CompleteTransactionCommand.COMMAND_ID:
               command = new CompleteTransactionCommand(cacheName);
               break;
            case CacheViewControlCommand.COMMAND_ID:
               command = new CacheViewControlCommand(cacheName);
               break;
            default:
               throw new CacheException("Unknown command id " + id + "!");
         }
      } else {
View Full Code Here

TOP

Related Classes of org.infinispan.commands.control.CacheViewControlCommand

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.