Package org.jboss.cache.buddyreplication

Examples of org.jboss.cache.buddyreplication.GravitateResult


      expect(spiMock.getNode(fqn)).andReturn(nodes.adfNode);
      ArrayList arrayList = new ArrayList();
      expect(containerMock.buildNodeData(Collections.EMPTY_LIST, nodes.adfNode, false)).andReturn(arrayList);
      control.replay();
      GravitateResult result = (GravitateResult) command.perform(ctx);
      control.verify();

      assert result != null;
      assert result.getNodeData() == arrayList;
   }
View Full Code Here


      ArrayList listReference = new ArrayList();
      expect(containerMock.buildNodeData(Collections.EMPTY_LIST, nodes.abcNode, false)).andReturn(listReference);

      control.replay();
      GravitateResult result = (GravitateResult) command.perform(ctx);
      assert result.getNodeData() == listReference;
      control.verify();
   }
View Full Code Here

   }

   private BackupData remoteBackupGet(Fqn name) throws Exception
   {
      BackupData result = null;
      GravitateResult gr = gravitateData(name);
      if (gr.isDataFound())
      {
         if (trace)
         {
            log.trace("Got response " + gr);
         }
View Full Code Here

         if (mbrs.size() > 1) log.error("No replies to call " + command);
         return GravitateResult.noDataFound();
      }

      // test for and remove exceptions
      GravitateResult result = GravitateResult.noDataFound();
      for (Object o : resps)
      {
         if (o instanceof Throwable)
         {
            if (log.isDebugEnabled())
            {
               log.debug("Found remote Throwable among responses - removing from responses list", (Exception) o);
            }
         }
         else if (o != null)
         {
            result = (GravitateResult) o;
            if (result.isDataFound())
            {
               break;
            }
         }
         else if (!configuration.isUseRegionBasedMarshalling())
View Full Code Here

      }
   }

   private BackupData localBackupGet(Fqn fqn, InvocationContext ctx) throws CacheException
   {
      GravitateResult result = cacheSPI.gravitateData(fqn, true, ctx);// a "local" gravitation
      boolean found = result.isDataFound();
      BackupData data = null;

      if (found)
      {
         Fqn backupFqn = result.getBuddyBackupFqn();
         data = new BackupData(fqn, result);
         // now the cleanup
         if (buddyManager.isDataGravitationRemoveOnFind())
         {
            // Remove locally only; the remote call will
View Full Code Here

   }

   private BackupData remoteBackupGet(Fqn name) throws Exception
   {
      BackupData result = null;
      GravitateResult gr = gravitateData(name);
      if (gr.isDataFound())
      {
         if (trace)
         {
            log.trace("Got response " + gr);
         }
View Full Code Here

         if (mbrs.size() > 1) log.error("No replies to call " + command);
         return GravitateResult.noDataFound();
      }

      // test for and remove exceptions
      GravitateResult result = GravitateResult.noDataFound();
      for (Object o : resps)
      {
         if (o instanceof Throwable)
         {
            if (log.isDebugEnabled())
            {
               log.debug("Found remote Throwable among responses - removing from responses list", (Exception) o);
            }
         }
         else if (o != null)
         {
            result = (GravitateResult) o;
            if (result.isDataFound())
            {
               break;
            }
         }
         else if (!configuration.isUseRegionBasedMarshalling())
View Full Code Here

      }
   }

   private BackupData localBackupGet(Fqn fqn, InvocationContext ctx) throws CacheException
   {
      GravitateResult result = cacheSPI.gravitateData(fqn, true, ctx);// a "local" gravitation
      boolean found = result.isDataFound();
      BackupData data = null;

      if (found)
      {
         Fqn backupFqn = result.getBuddyBackupFqn();
         data = new BackupData(fqn, result);
         // now the cleanup
         if (buddyManager.isDataGravitationRemoveOnFind())
         {
            // Remove locally only; the remote call will
View Full Code Here

      {
         pendingResponders.remove(address);

         if (object instanceof GravitateResult)
         {
            GravitateResult response = (GravitateResult) object;
            if (response.isDataFound()) numValidResponses++;
         }
         // always return true to make sure a response is logged by the JGroups RpcDispatcher.
         return true;
      }
View Full Code Here

      expect(spiMock.getNode(fqn)).andReturn(nodes.adfNode);
      ArrayList arrayList = new ArrayList();
      expect(containerMock.buildNodeData(Collections.EMPTY_LIST, nodes.adfNode, false)).andReturn(arrayList);
      control.replay();
      GravitateResult result = (GravitateResult) command.perform(ctx);
      control.verify();

      assert result != null;
      assert result.getNodeData() == arrayList;
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.buddyreplication.GravitateResult

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.