Package org.infinispan.commands.control

Examples of org.infinispan.commands.control.RehashControlCommand


            // 5.  txLogger being enabled will cause ClusteredGetCommands to return uncertain responses.

            // 6.  pull state from everyone.
            Address myAddress = rpcManager.getTransport().getAddress();
            RehashControlCommand cmd = cf.buildRehashControlCommand(PULL_STATE, myAddress, null, chNew);
            // TODO I should be able to process state chunks from different nodes simultaneously!!
            List<Address> addressesWhoMaySendStuff = getAddressesWhoMaySendStuff(configuration.getNumOwners());
            List<Response> resps = rpcManager.invokeRemotely(addressesWhoMaySendStuff, cmd, SYNCHRONOUS, configuration.getRehashRpcTimeout(), true);

            // 7.  Apply state
View Full Code Here


         case LockControlCommand.COMMAND_ID:
            LockControlCommand lcc = (LockControlCommand) c;
            lcc.init(interceptorChain, icc, txTable);
            break;
         case RehashControlCommand.COMMAND_ID:
            RehashControlCommand rcc = (RehashControlCommand) c;
            rcc.init(distributionManager, configuration, dataContainer, this);
            break;
         default:
            if (trace)
               log.trace("Nothing to initialize for command: " + c);
      }
View Full Code Here

   public RehashControlCommand buildRehashControlCommand(Address sender, Map<Object, InternalCacheValue> state) {
      return buildRehashControlCommand(PUSH_STATE, sender, state, null);
   }

   public RehashControlCommand buildRehashControlCommandTxLog(Address sender, List<WriteCommand> commands) {
      return new RehashControlCommand(cacheName, DRAIN_TX, sender, commands, null, this);
   }
View Full Code Here

   public RehashControlCommand buildRehashControlCommandTxLog(Address sender, List<WriteCommand> commands) {
      return new RehashControlCommand(cacheName, DRAIN_TX, sender, commands, null, this);
   }

   public RehashControlCommand buildRehashControlCommandTxLogPendingPrepares(Address sender, List<PrepareCommand> commands) {
      return new RehashControlCommand(cacheName, DRAIN_TX_PREPARES, sender, null, commands, this);
   }
View Full Code Here

   public RehashControlCommand buildRehashControlCommandTxLogPendingPrepares(Address sender, List<PrepareCommand> commands) {
      return new RehashControlCommand(cacheName, DRAIN_TX_PREPARES, sender, null, commands, this);
   }

   public RehashControlCommand buildRehashControlCommand(RehashControlCommand.Type type, Address sender, Map<Object, InternalCacheValue> state, ConsistentHash consistentHash) {
      return new RehashControlCommand(cacheName, type, sender, state, consistentHash, this);
   }
View Full Code Here

         // push state.
         Set<Future<Object>> pushFutures = new HashSet<Future<Object>>();
         for (Map.Entry<Address, Map<Object, InternalCacheValue>> entry : statemap.getState().entrySet()) {
            if (log.isDebugEnabled()) log.debug("Pushing {0} entries to {1}", entry.getValue().size(), entry.getKey());
            RehashControlCommand push = cf.buildRehashControlCommand(self, entry.getValue());
            NotifyingNotifiableFuture<Object> f = new NotifyingFutureImpl(null);
            pushFutures.add(f);
            rpcManager.invokeRemotelyInFuture(Collections.singleton(entry.getKey()), push, true, f, configuration.getRehashRpcTimeout());
         }
View Full Code Here

      Set<Future<Object>> pushFutures = new HashSet<Future<Object>>();
      for (Map.Entry<Address, List<PrepareCommand>> e : state.getState().entrySet()) {
         if (log.isDebugEnabled())
            log.debug("Pushing {0} uncommitted prepares to {1}", e.getValue().size(), e.getKey());
         RehashControlCommand push = cf.buildRehashControlCommandTxLogPendingPrepares(self, e.getValue());
         NotifyingNotifiableFuture<Object> f = new NotifyingFutureImpl(null);
         pushFutures.add(f);
         rpcManager.invokeRemotelyInFuture(Collections.singleton(e.getKey()), push, true, f, configuration.getRehashRpcTimeout());
      }
View Full Code Here

      Set<Future<Object>> pushFutures = new HashSet<Future<Object>>();
      for (Map.Entry<Address, List<WriteCommand>> entry : state.getState().entrySet()) {
         if (log.isDebugEnabled())
            log.debug("Pushing {0} modifications to {1}", entry.getValue().size(), entry.getKey());
         RehashControlCommand push = cf.buildRehashControlCommandTxLog(self, entry.getValue());
         NotifyingNotifiableFuture<Object> f = new NotifyingFutureImpl(null);
         pushFutures.add(f);
         rpcManager.invokeRemotelyInFuture(Collections.singleton(entry.getKey()), push, true, f, configuration.getRehashRpcTimeout());
      }
View Full Code Here

         case LockControlCommand.COMMAND_ID:
            LockControlCommand lcc = (LockControlCommand) c;
            lcc.init(interceptorChain, icc, txTable);
            break;
         case RehashControlCommand.COMMAND_ID:
            RehashControlCommand rcc = (RehashControlCommand) c;
            rcc.init(distributionManager, configuration, dataContainer, this);
            break;
         default:
            if (trace)
               log.trace("Nothing to initialize for command: " + c);
      }
View Full Code Here

   public RehashControlCommand buildRehashControlCommand(Address sender, Map<Object, InternalCacheValue> state) {
      return buildRehashControlCommand(PUSH_STATE, sender, state, null);
   }

   public RehashControlCommand buildRehashControlCommandTxLog(Address sender, List<WriteCommand> commands) {
      return new RehashControlCommand(cacheName, DRAIN_TX, sender, commands, null, this);
   }
View Full Code Here

TOP

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

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.