Examples of ClusteredGetCommand


Examples of org.infinispan.commands.remote.ClusteredGetCommand

   public StateTransferControlCommand buildStateTransferControlCommand(boolean block) {
      return new StateTransferControlCommand(block);
   }

   public ClusteredGetCommand buildClusteredGetCommand(Object key) {
      return new ClusteredGetCommand(key, cacheName);
   }
View Full Code Here

Examples of org.infinispan.commands.remote.ClusteredGetCommand

         case ClearCommand.COMMAND_ID:
            ClearCommand cc = (ClearCommand) c;
            cc.init(notifier);
            break;
         case ClusteredGetCommand.COMMAND_ID:
            ClusteredGetCommand clusteredGetCommand = (ClusteredGetCommand) c;
            clusteredGetCommand.initialize(dataContainer, icc, this, interceptorChain);
            break;
         case LockControlCommand.COMMAND_ID:
            LockControlCommand lcc = (LockControlCommand) c;
            lcc.init(interceptorChain, icc, txTable);
            break;
View Full Code Here

Examples of org.infinispan.commands.remote.ClusteredGetCommand

      if (entry.getLifespan() < 0 || entry.getLifespan() > configuration.getL1Lifespan())
         entry.setLifespan(configuration.getL1Lifespan());
   }

   public InternalCacheEntry retrieveFromRemoteSource(Object key) throws Exception {
      ClusteredGetCommand get = cf.buildClusteredGetCommand(key);

      ResponseFilter filter = new ClusteredGetResponseValidityFilter(locate(key));
      List<Response> responses = rpcManager.invokeRemotely(locate(key), get, ResponseMode.SYNCHRONOUS,
                                                           configuration.getSyncReplTimeout(), false, filter);
View Full Code Here

Examples of org.infinispan.commands.remote.ClusteredGetCommand

      return new SingleRpcCommand(cacheName, call);
   }

   @Override
   public ClusteredGetCommand buildClusteredGetCommand(Object key, Set<Flag> flags, boolean acquireRemoteLock, GlobalTransaction gtx) {
      return new ClusteredGetCommand(key, cacheName, flags, acquireRemoteLock, gtx);
   }
View Full Code Here

Examples of org.jboss.cache.commands.remote.ClusteredGetCommand

  public Set getChildrenNames(Fqn fqn) throws Exception {
    return Collections.emptySet();
  }

  private List<Object> callRemote(DataCommand dataCommand) throws Exception {
    ClusteredGetCommand clusteredGet = commandsFactory  .buildClusteredGetCommand(false, dataCommand);
    List resps;
    // JBCACHE-1186
    resps = cache.getRPCManager().callRemoteMethods(null,  clusteredGet, GroupRequest.GET_ALL, config.getTimeout(), new ResponseValidityFilter(cache.getMembers(), cache.getLocalAddress(), dataCommand), false);

    if (resps == null) {
View Full Code Here

Examples of org.jboss.cache.commands.remote.ClusteredGetCommand

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      final Fqn region = Fqn.fromString("/hello");
      Region r = rm.getRegion(region, true);
      r.registerContextClassLoader(this.getClass().getClassLoader());
      cm200.objectToObjectStream(new ClusteredGetCommand(false, null), oos, region);
      oos.close();

      final byte[] stream = baos.toByteArray();
      // so now the stream starts with the Fqn "/hello".
View Full Code Here

Examples of org.jboss.cache.commands.remote.ClusteredGetCommand

   @SuppressWarnings("deprecation")
   private Object callRemote(DataCommand dataCommand) throws Exception
   {
      if (trace) log.trace("cache=" + cache.getLocalAddress() + "; calling with " + dataCommand);
      ClusteredGetCommand clusteredGet = commandsFactory.buildClusteredGetCommand(false, dataCommand);
      List resps;
      // JBCACHE-1186
      resps = cache.getRPCManager().callRemoteMethods(null, clusteredGet, GroupRequest.GET_ALL, config.getTimeout(), new ResponseValidityFilter(cache.getMembers(), cache.getLocalAddress()), false);

      if (resps == null)
View Full Code Here

Examples of org.jboss.cache.commands.remote.ClusteredGetCommand

      return command;
   }

   public ClusteredGetCommand buildClusteredGetCommand(Boolean searchBackupSubtrees, DataCommand dataCommand)
   {
      ClusteredGetCommand command = new ClusteredGetCommand(searchBackupSubtrees, dataCommand);
      command.initialize(dataContainer, invoker);
      return command;
   }
View Full Code Here

Examples of org.jboss.cache.commands.remote.ClusteredGetCommand

            break;
         }

         case ClusteredGetCommand.METHOD_ID:
         {
            ClusteredGetCommand returnValue = new ClusteredGetCommand();
            returnValue.initialize(dataContainer, invoker);
            command = returnValue;
            break;
         }
         // ---- Buddy replication - group organisation commands
         case AnnounceBuddyPoolNameCommand.METHOD_ID:
         {
            AnnounceBuddyPoolNameCommand returnValue = new AnnounceBuddyPoolNameCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case AssignToBuddyGroupCommand.METHOD_ID:
         {
            AssignToBuddyGroupCommand returnValue = new AssignToBuddyGroupCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case RemoveFromBuddyGroupCommand.METHOD_ID:
         {
            RemoveFromBuddyGroupCommand returnValue = new RemoveFromBuddyGroupCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case DataGravitationCleanupCommand.METHOD_ID:
         {
            DataGravitationCleanupCommand returnValue = new DataGravitationCleanupCommand();
            returnValue.initialize(buddyManager, invoker, transactionTable, this, dataContainer, buddyFqnTransformer);
            command = returnValue;
            break;
         }
         case GravitateDataCommand.METHOD_ID:
         {
            GravitateDataCommand returnValue = new GravitateDataCommand(rpcManager.getLocalAddress());
            returnValue.initialize(dataContainer, cacheSpi, buddyFqnTransformer);
            command = returnValue;
            break;
         }
         default:
            throw new CacheException("Unknown command id " + id + "!");
View Full Code Here

Examples of org.jboss.cache.commands.remote.ClusteredGetCommand

      assertNotSame(MyList.class, cache2.get(fqn, key).getClass());
      assertSame(listClass, cache2.get(fqn, key).getClass());


      DataCommand command = new GetKeyValueCommand(fqn, key, false);
      ClusteredGetCommand clusteredGet = new ClusteredGetCommand(false, command);

      List responses = cache1.getRPCManager().callRemoteMethods(null, clusteredGet, true, 15000, false);
      List response1 = (List) responses.get(0);// response from the first (and only) node

      Boolean found = (Boolean) response1.get(0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.