Package org.infinispan.xsite

Examples of org.infinispan.xsite.OfflineStatus


   }

   public void testPutWithFailures() {
      populateKeys(cache("LON", 0));
      BackupSenderImpl bs = (BackupSenderImpl) cache("LON", 0).getAdvancedCache().getComponentRegistry().getComponent(BackupSender.class);
      OfflineStatus nycStatus = bs.getOfflineStatus("NYC");

      for (int i = 0; i < FAILURES / nrRpcPerPut; i++) {
         try {
            assertEquals(BackupSender.BringSiteOnlineResponse.ALREADY_ONLINE, bs.bringSiteOnline("NYC"));
            cache("LON", 0).put(KEYS[i], "v" + i);
            fail("This should have failed");
         } catch (Exception e) {
            Assert.assertEquals(i + 1, nycStatus.getFailureCount());
         }
      }

      assert nycStatus.isOffline();

      for (int i = 0; i < FAILURES; i++) {
         cache("LON", 0).put(KEYS[i], "v" + i);
      }
View Full Code Here

TOP

Related Classes of org.infinispan.xsite.OfflineStatus

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.