Package org.infinispan.container

Examples of org.infinispan.container.DataContainer.containsKey()


      TestingUtil.waitForRehashToComplete(cache(0), cache(1), cache(2));

      DataContainer dataContainer = TestingUtil.extractComponent(cache(0), DataContainer.class);
      assertTrue(dataContainer.containsKey(k1));
      assertTrue(dataContainer.containsKey(k2));
      assertTrue(dataContainer.containsKey(k3));
   }

   public void testStateResponseWhileRestartingBrokenTransfers() throws Throwable {
      Address primary = address(1);
      MagicKey k1 = new MagicKey("k1", cache(1));
View Full Code Here


      TestingUtil.waitForRehashToComplete(nonOwnerCache, manager(liveNode).getCache());

      log.debugf("Final checkpoint status: %s", checkPoint);
      DataContainer dataContainer = TestingUtil.extractComponent(nonOwnerCache, DataContainer.class);
      assertTrue(dataContainer.containsKey(k1));
   }

   private void replaceInvocationHandler(final CheckPoint checkPoint, final EmbeddedCacheManager manager,
                                         final Address nonOwner)
         throws Throwable {
View Full Code Here

      int i = 0;
      DataContainer dataContainer = TestingUtil.extractComponent(primaryOwner, DataContainer.class);
      while (true) {
         primaryOwner.put(new MagicKey("other-key-" + i, primaryOwner), "value");
         if (!dataContainer.containsKey(key)) {
            //the key was evicted and it is only in persistence.
            break;
         }
      }
View Full Code Here

         for (int j = 0; j < NUM_KEYS; j++) {
            String key = "key" + j;
            // each key must only occur once (numOwners is one)
            if (dm.getLocality(key).isLocal()) {
               assertTrue("Key '" + key + "' is owned by node " + address(i) + " but it doesn't appears there",
                     dataContainer.containsKey(key));
            } else {
               assertTrue("Key '" + key + "' is not owned by node " + address(i) + " but it still appears there",
                     !dataContainer.containsKey(key));
            }
         }
View Full Code Here

            if (dm.getLocality(key).isLocal()) {
               assertTrue("Key '" + key + "' is owned by node " + address(i) + " but it doesn't appears there",
                     dataContainer.containsKey(key));
            } else {
               assertTrue("Key '" + key + "' is not owned by node " + address(i) + " but it still appears there",
                     !dataContainer.containsKey(key));
            }
         }
      }
   }
View Full Code Here

         for (int j = 0; j < NUM_KEYS; j++) {
            String key = "key" + j;
            if (!dm.getLocality(key).isLocal()) {
               assertFalse("Key '" + key + "' is not owned by node " + address(i) + " but it still appears there",
                     dataContainer.containsKey(key));
            } else if (preload) {
               assertTrue("Key '" + key + "' is owned by node " + address(i) + " but it does not appear there",
                     dataContainer.containsKey(key));
            }
         }
View Full Code Here

            if (!dm.getLocality(key).isLocal()) {
               assertFalse("Key '" + key + "' is not owned by node " + address(i) + " but it still appears there",
                     dataContainer.containsKey(key));
            } else if (preload) {
               assertTrue("Key '" + key + "' is owned by node " + address(i) + " but it does not appear there",
                     dataContainer.containsKey(key));
            }
         }
      }

      DummyInMemoryStore store = (DummyInMemoryStore) TestingUtil.getFirstLoader(cache(0, TEST_CACHE_NAME));
View Full Code Here

      crm.stopBlocking();

      TestingUtil.waitForRehashToComplete(cache(0), cache(1), cache(2));

      DataContainer dataContainer = TestingUtil.extractComponent(cache(0), DataContainer.class);
      assertTrue(dataContainer.containsKey(k1));
      assertTrue(dataContainer.containsKey(k2));
      assertTrue(dataContainer.containsKey(k3));
   }

   public void testStateResponseWhileRestartingBrokenTransfers() throws Throwable {
View Full Code Here

      TestingUtil.waitForRehashToComplete(cache(0), cache(1), cache(2));

      DataContainer dataContainer = TestingUtil.extractComponent(cache(0), DataContainer.class);
      assertTrue(dataContainer.containsKey(k1));
      assertTrue(dataContainer.containsKey(k2));
      assertTrue(dataContainer.containsKey(k3));
   }

   public void testStateResponseWhileRestartingBrokenTransfers() throws Throwable {
      MagicKey k1 = new MagicKey("k1", cache(1), cache(2), cache(3));
View Full Code Here

      TestingUtil.waitForRehashToComplete(cache(0), cache(1), cache(2));

      DataContainer dataContainer = TestingUtil.extractComponent(cache(0), DataContainer.class);
      assertTrue(dataContainer.containsKey(k1));
      assertTrue(dataContainer.containsKey(k2));
      assertTrue(dataContainer.containsKey(k3));
   }

   public void testStateResponseWhileRestartingBrokenTransfers() throws Throwable {
      MagicKey k1 = new MagicKey("k1", cache(1), cache(2), cache(3));
      cache(0).put(k1, "v1");
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.