Package org.infinispan.topology

Examples of org.infinispan.topology.CacheTopologyControlCommand


      PutKeyValueCommand putKeyValueCommand = new PutKeyValueCommand("key", "value", false, null, -1, -1, InfinispanCollections.<Flag>emptySet());

      //populate commands
      blockingCacheRpcCommand = new ReduceCommand<Object, Object>(cacheName);
      nonBlockingCacheRpcCommand = new ClusteredGetCommand(cacheName);
      blockingNonCacheRpcCommand = new CacheTopologyControlCommand();
      //the GetKeyValueCommand is not replicated, but I only need a command that returns false in canBlock()
      nonBlockingNonCacheRpcCommand = new GetKeyValueCommand("key", InfinispanCollections.<Flag>emptySet());
      blockingSingleRpcCommand = new SingleRpcCommand(cacheName, putKeyValueCommand);
      nonBlockingSingleRpcCommand = new SingleRpcCommand(cacheName, getKeyValueCommand);
      blockingMultipleRpcCommand = new MultipleRpcCommand(Arrays.<ReplicableCommand>asList(putKeyValueCommand, putKeyValueCommand), cacheName);
View Full Code Here


      @Override
      public void handle(CacheRpcCommand cmd, Address origin, org.jgroups.blocks.Response response, boolean preserveOrder) throws Throwable {
         boolean notifyRehashStarted = false;
         if (cmd instanceof CacheTopologyControlCommand) {
            CacheTopologyControlCommand rcc = (CacheTopologyControlCommand) cmd;
            log.debugf("Intercepted command: %s", cmd);
            switch (rcc.getType()) {
               case REBALANCE_START:
                  txsReady.await();
                  notifyRehashStarted = true;
                  break;
               case CH_UPDATE:
View Full Code Here

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

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

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

                  new EmbeddedMetadata.Builder().build(), InfinispanCollections.<Flag>emptySet());

      //populate commands
      blockingCacheRpcCommand = new ReduceCommand<Object, Object>(cacheName);
      nonBlockingCacheRpcCommand = new ClusteredGetCommand(cacheName);
      blockingNonCacheRpcCommand = new CacheTopologyControlCommand();
      //the GetKeyValueCommand is not replicated, but I only need a command that returns false in canBlock()
      nonBlockingNonCacheRpcCommand = new GetKeyValueCommand("key", InfinispanCollections.<Flag>emptySet(), false);
      blockingSingleRpcCommand = new SingleRpcCommand(cacheName, putKeyValueCommand);
      nonBlockingSingleRpcCommand = new SingleRpcCommand(cacheName, getKeyValueCommand);
      blockingMultipleRpcCommand = new MultipleRpcCommand(Arrays.<ReplicableCommand>asList(putKeyValueCommand, putKeyValueCommand), cacheName);
View Full Code Here

      @Override
      public void handle(CacheRpcCommand cmd, Address origin, org.jgroups.blocks.Response response, boolean preserveOrder) throws Throwable {
         boolean notifyRehashStarted = false;
         if (cmd instanceof CacheTopologyControlCommand) {
            CacheTopologyControlCommand rcc = (CacheTopologyControlCommand) cmd;
            log.debugf("Intercepted command: %s", cmd);
            switch (rcc.getType()) {
               case REBALANCE_START:
                  txsReady.await();
                  notifyRehashStarted = true;
                  break;
               case CH_UPDATE:
View Full Code Here

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

   }

   private boolean isTotalOrderStateTransferCommand(ReplicableCommand command) throws InterruptedException {
      boolean isTotalOrder = false;
      if (command instanceof CacheTopologyControlCommand) {
         CacheTopologyControlCommand controlCommand = (CacheTopologyControlCommand) command;
         switch (controlCommand.getType()) {
            case REBALANCE_START:
            case CH_UPDATE:
               LocalTopologyManager topologyManager = gcr.getComponent(LocalTopologyManager.class);
               isTotalOrder = topologyManager != null && topologyManager.isTotalOrderCache(controlCommand.getCacheName());
               break;
         }
      }
      return isTotalOrder;
   }
View Full Code Here

               break;
            case ApplyDeltaCommand.COMMAND_ID:
               command = new ApplyDeltaCommand();
               break;
            case CacheTopologyControlCommand.COMMAND_ID:
               command = new CacheTopologyControlCommand();
               break;
            case GetKeysInGroupCommand.COMMAND_ID:
               command = new GetKeysInGroupCommand();
               break;
            default:
View Full Code Here

TOP

Related Classes of org.infinispan.topology.CacheTopologyControlCommand

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.