Package org.jboss.cache.commands.remote

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


      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

   @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

      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

            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

      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

      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

      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

   @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

      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

TOP

Related Classes of org.jboss.cache.commands.remote.ClusteredGetCommand

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.