Package org.infinispan.commands.control

Examples of org.infinispan.commands.control.RehashControlCommand


      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, null,  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 buildRehashControlCommand(RehashControlCommand.Type type,
            Address sender, Map<Object, InternalCacheValue> state, ConsistentHash oldCH,
            ConsistentHash newCH, List<Address> leavers) {
      return new RehashControlCommand(cacheName, type, sender, state, oldCH, newCH, leavers, this);
   }
View Full Code Here

            // 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_JOIN, myAddress, null, chOld, chNew,null);
            // TODO I should be able to process state chunks from different nodes simultaneously!!
            List<Address> addressesWhoMaySendStuff = getAddressesWhoMaySendStuff(chNew, configuration.getNumOwners());
            List<Response> resps = rpcManager.invokeRemotely(addressesWhoMaySendStuff, cmd, SYNCHRONOUS, configuration.getRehashRpcTimeout(), true);

            // 7.  Apply state
View Full Code Here

            }
         }
         if (configuration.isRehashEnabled()) {
            if (isReceiver) {
               Address myAddress = rpcManager.getTransport().getAddress();
               RehashControlCommand cmd = cf.buildRehashControlCommand(PULL_STATE_LEAVE, myAddress,
                        null, oldCH, newCH,leaversHandled);

               List<Address> addressesWhoMaySendStuff = getStateProviderTargets();
               log.debug("I {0} am pulling state from {1}", self, addressesWhoMaySendStuff);
               List<Response> resps = rpcManager.invokeRemotely(addressesWhoMaySendStuff, cmd,
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

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.