Package org.infinispan.util.concurrent

Examples of org.infinispan.util.concurrent.AggregatingNotifyingFutureImpl


   }

   public NotifyingNotifiableFuture<Object> flushCache(Collection<Object> keys, Object retval, Address origin) {
      if (trace) log.tracef("Invalidating L1 caches for keys %s", keys);

      NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);

      Collection<Address> invalidationAddresses = buildInvalidationAddressList(keys, origin);

      int nodes = invalidationAddresses.size();
View Full Code Here


   private NotifyingNotifiableFuture<Object> flushL1Cache(int numCallRecipients, Object[] keys, Object retval) {
      if (isL1CacheEnabled && numCallRecipients > 0 && rpcManager.getTransport().getMembers().size() > numCallRecipients) {
         if (trace) log.trace("Invalidating L1 caches");
         InvalidateCommand ic = cf.buildInvalidateFromL1Command(false, keys);
         NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
         rpcManager.broadcastRpcCommandInFuture(ic, future);
         return future;
      }
      return null;
   }
View Full Code Here

   private NotifyingNotifiableFuture<Object> flushL1Cache(int numCallRecipients, Object[] keys, boolean useFuture, Object retval, boolean sync) {
      if (isL1CacheEnabled && numCallRecipients > 0 && rpcManager.getTransport().getMembers().size() > numCallRecipients) {
         if (trace) log.trace("Invalidating L1 caches");
         InvalidateCommand ic = cf.buildInvalidateFromL1Command(keys);
         if (useFuture) {
            NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
            rpcManager.broadcastRpcCommandInFuture(ic, future);
            return future;
         } else {
            rpcManager.broadcastRpcCommand(ic, sync);
         }
View Full Code Here

   }
  
   public NotifyingNotifiableFuture<Object> flushCache(Collection<Object> keys, Object retval, Address origin) {
      if (trace) log.tracef("Invalidating L1 caches for keys %s", keys);
     
      NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
     
      Collection<Address> invalidationAddresses = buildInvalidationAddressList(keys, origin);
     
      int nodes = invalidationAddresses.size();
View Full Code Here

   private NotifyingNotifiableFuture<Object> flushL1Cache(int numCallRecipients, Object[] keys, Object retval, boolean sync) {
      if (isL1CacheEnabled && numCallRecipients > 0 && rpcManager.getTransport().getMembers().size() > numCallRecipients) {
         if (trace) log.trace("Invalidating L1 caches");
         InvalidateCommand ic = cf.buildInvalidateFromL1Command(false, keys);
//         if (useFuture) {
            NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
            rpcManager.broadcastRpcCommandInFuture(ic, future);
            return future;
//         } else {
//            rpcManager.broadcastRpcCommand(ic, sync);
//         }
View Full Code Here

   }
  
   public NotifyingNotifiableFuture<Object> flushCache(Collection<Object> keys, Object retval, Address origin) {
      if (trace) log.tracef("Invalidating L1 caches for keys %s", keys);
     
      NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
     
      Collection<Address> invalidationAddresses = buildInvalidationAddressList(keys, origin);
     
      int nodes = invalidationAddresses.size();
View Full Code Here

   }
  
   public NotifyingNotifiableFuture<Object> flushCache(Collection<Object> keys, Object retval, Address origin) {
      if (trace) log.tracef("Invalidating L1 caches for keys %s", keys);
     
      NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
     
      Collection<Address> invalidationAddresses = buildInvalidationAddressList(keys, origin);
     
      int nodes = invalidationAddresses.size();
View Full Code Here

         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 {
               return asyncTransportExecutor.submit(new Callable<Object>() {
                  @Override
                  public Object call() throws Exception {
                     rpcManager.broadcastRpcCommand(ic, true);
                     return retval;
                  }
               });
            }
         } else {
            final CacheRpcCommand rpc = commandsFactory.buildSingleRpcCommand(commandsFactory.buildInvalidateFromL1Command(origin, false, keys));
            // Ask the caches who have requested from us to remove
            if (trace) log.tracef("Keys %s needs invalidation on %s", keys, invalidationAddresses);
            if (useNotifyingFuture) {
               NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
               rpcManager.invokeRemotelyInFuture(invalidationAddresses, rpc, true, future, rpcTimeout, true);
               return future;
            } else {
               return asyncTransportExecutor.submit(new Callable<Object>() {
                  @Override
View Full Code Here

         if (multicast) {
            if (trace) log.tracef("Invalidating keys %s via multicast", keys);
            final InvalidateCommand ic = commandsFactory.buildInvalidateFromL1Command(origin, false, Collections.<Flag>emptySet(), keys);
            if (useNotifyingFuture) {
               NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
               rpcManager.broadcastRpcCommandInFuture(ic, future);
               return future;
            } else {
               return asyncTransportExecutor.submit(new Callable<Object>() {
                  @Override
                  public Object call() throws Exception {
                     rpcManager.broadcastRpcCommand(ic, true);
                     return retval;
                  }
               });
            }
         } else {
            final CacheRpcCommand rpc = commandsFactory.buildSingleRpcCommand(
                  commandsFactory.buildInvalidateFromL1Command(origin, false, Collections.<Flag>emptySet(), keys));
            // Ask the caches who have requested from us to remove
            if (trace) log.tracef("Keys %s needs invalidation on %s", keys, invalidationAddresses);
            if (useNotifyingFuture) {
               NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
               rpcManager.invokeRemotelyInFuture(invalidationAddresses, rpc, true, future, rpcTimeout, true);
               return future;
            } else {
               return asyncTransportExecutor.submit(new Callable<Object>() {
                  @Override
View Full Code Here

         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 {
               return asyncTransportExecutor.submit(new Callable<Object>() {
                  @Override
                  public Object call() throws Exception {
                     rpcManager.broadcastRpcCommand(ic, true);
                     return retval;
                  }
               });
            }
         } else {
            final CacheRpcCommand rpc = commandsFactory.buildSingleRpcCommand(commandsFactory.buildInvalidateFromL1Command(origin, false, keys));
            // Ask the caches who have requested from us to remove
            if (trace) log.tracef("Keys %s needs invalidation on %s", keys, invalidationAddresses);
            if (useNotifyingFuture) {
               NotifyingNotifiableFuture<Object> future = new AggregatingNotifyingFutureImpl(retval, 2);
               rpcManager.invokeRemotelyInFuture(invalidationAddresses, rpc, true, future, rpcTimeout, true);
               return future;
            } else {
               return asyncTransportExecutor.submit(new Callable<Object>() {
                  @Override
View Full Code Here

TOP

Related Classes of org.infinispan.util.concurrent.AggregatingNotifyingFutureImpl

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.