Package org.infinispan.commands.write

Examples of org.infinispan.commands.write.InvalidateCommand


            if (src.getCommand() != null)
               initializeReplicableCommand(src.getCommand(), false);

            break;
         case InvalidateCommand.COMMAND_ID:
            InvalidateCommand ic = (InvalidateCommand) c;
            ic.init(notifier);
            break;
         case InvalidateL1Command.COMMAND_ID:
            InvalidateL1Command ilc = (InvalidateL1Command) c;
            ilc.init(configuration, distributionManager, notifier, dataContainer);
            break;
View Full Code Here


   public RemoveCommand buildRemoveCommand(Object key, Object value) {
      return new RemoveCommand(key, value, notifier);
   }

   public InvalidateCommand buildInvalidateCommand(Object... keys) {
      return new InvalidateCommand(notifier, keys);
   }
View Full Code Here

            if (src.getCommand() != null)
               initializeReplicableCommand(src.getCommand(), false);

            break;
         case InvalidateCommand.COMMAND_ID:
            InvalidateCommand ic = (InvalidateCommand) c;
            ic.init(notifier);
            break;
         case InvalidateL1Command.COMMAND_ID:
            InvalidateL1Command ilc = (InvalidateL1Command) c;
            ilc.init(configuration, distributionManager, notifier, dataContainer);
            break;
View Full Code Here

         if (trace)
            log.tracef("There are %s nodes involved in invalidation. Threshold is: %s; using multicast: %s", nodes, threshold, multicast);

         if (multicast) {
            if (trace) log.tracef("Invalidating keys %s via multicast", keys);
            final InvalidateCommand ic = commandsFactory.buildInvalidateFromL1Command(origin, false, keys);
            if (useNotifyingFuture) {
               NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
               rpcManager.broadcastRpcCommandInFuture(ic, future);
               return future;
            } else {
View Full Code Here

   protected Object invalidateAcrossCluster(boolean synchronous, InvocationContext ctx, Object[] keys, boolean useFuture,
                                            final Object retvalForFuture) throws Throwable {
      if (!isLocalModeForced(ctx)) {
         // increment invalidations counter if statistics maintained
         incrementInvalidations();
         final InvalidateCommand command = commandsFactory.buildInvalidateCommand(keys);
         if (log.isDebugEnabled())
            log.debug("Cache [" + rpcManager.getTransport().getAddress() + "] replicating " + command);
         // voila, invalidated!
         if (useFuture) {
            NotifyingNotifiableFuture<Object> future = new NotifyingFutureImpl(retvalForFuture);
View Full Code Here

         if (trace) log.tracef("There are %s nodes involved in invalidation. Threshold is: %s; using multicast: %s", nodes, threshold, multicast);
        
         if (multicast) {
           if (trace) log.tracef("Invalidating keys %s via multicast", keys);
           InvalidateCommand ic = commandsFactory.buildInvalidateFromL1Command(false, keys);
          rpcManager.broadcastRpcCommandInFuture(ic, future);
         } else {
           InvalidateCommand ic = commandsFactory.buildInvalidateFromL1Command(false, keys);
          
            // Ask the caches who have requested from us to remove
            if (trace) log.tracef("Keys %s needs invalidation on %s", keys, invalidationAddresses);
            rpcManager.invokeRemotelyInFuture(invalidationAddresses, ic, future);
            return future;
View Full Code Here

               break;
            case ClearCommand.COMMAND_ID:
               command = new ClearCommand();
               break;
            case InvalidateCommand.COMMAND_ID:
               command = new InvalidateCommand();
               break;
            case InvalidateL1Command.COMMAND_ID:
               command = new InvalidateL1Command();
               break;
            case DistributedExecuteCommand.COMMAND_ID:
View Full Code Here

   }

   public void invalidateKeys(List<Object> keysToRemove, int viewId) {
      try {
         if (keysToRemove.size() > 0) {
            InvalidateCommand invalidateCmd = cf.buildInvalidateFromL1Command(true, keysToRemove);
            InvocationContext ctx = icc.createNonTxInvocationContext();
            ctx.setFlags(CACHE_MODE_LOCAL, SKIP_LOCKING);
            interceptorChain.invoke(ctx, invalidateCmd);

            log.debugf("Invalidated %d keys, data container now has %d keys", keysToRemove.size(), dataContainer.size());
View Full Code Here

   protected void invalidateAcrossCluster(boolean synchronous, InvocationContext ctx, Object[] keys) throws Throwable {
      if (!isLocalModeForced(ctx)) {
         // increment invalidations counter if statistics maintained
         incrementInvalidations();
         InvalidateCommand command = commandsFactory.buildInvalidateCommand(keys);
         if (log.isDebugEnabled())
            log.debug("Cache [" + rpcManager.getTransport().getAddress() + "] replicating " + command);
         // voila, invalidated!
         replicateCall(ctx, command, synchronous);
      }
View Full Code Here

            }

            List<Address> rec = recipientGenerator.generateRecipients();
            // if L1 caching is used make sure we broadcast an invalidate message
            if (configuration.isL1CacheEnabled() && rec != null) {
               InvalidateCommand ic = cf.buildInvalidateCommand(recipientGenerator.getKeys());
               replicateCall(ctx, ic, isSynchronous(ctx), false);
            }
            replicateCall(ctx, rec, command, isSynchronous(ctx), false);
         } else {
            if (local) ctx.getTransactionContext().addLocalModification(command);
View Full Code Here

TOP

Related Classes of org.infinispan.commands.write.InvalidateCommand

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.