public void run() { try { Cache cache = GemFireCacheImpl.getInstance(); Region r1 = cache.getRegion(Region.SEPARATOR + REGION_NAME); assertNotNull(r1); r1.registerInterest(k1); r1.registerInterest(k2); } catch (Exception ex) { fail("failed while register Interest", ex); } }
public void testNotification_NonExistent_Create() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "updateEntry", new Object[] { KEY, "ValueMatrix1" }); waitForValue(r, KEY, "ValueMatrix1"); }
public static void registerInterestListAll() { try { Region r = cache.getRegion("/" + regionName); assertNotNull(r); r.registerInterest("ALL_KEYS"); } catch (Exception ex) { fail("failed in registerInterestListAll", ex); } }
public static void registerInterestListAll() { try { Region r = cache.getRegion("/" + regionName); assertNotNull(r); r.registerInterest("ALL_KEYS"); } catch (Exception ex) { fail("failed in registerInterestListAll", ex); } }
public void BROKEN_testNotification_LocalInvalid_Invalid() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); localInvalidateEntry(KEY); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "invalidateEntryOnly", new Object[] { KEY }); waitForValue(r, KEY, null); // invalidate }
public void testNotification_LocalInvalid_Destroy() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); invalidateEntry(KEY); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "destroyEntry", new Object[] { KEY }); waitForValue(r, KEY, null); // destroyed }
public void testNotification_NonExistent_Destroy() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); server1.invoke(DurableResponseMatrixDUnitTest.class, "updateEntry", new Object[] { KEY, "ValueMatrix1" }); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "destroyEntry", new Object[] { KEY }); waitForValue(r, KEY, null); // destroyed }
public void testNotification_Valid_Create() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); r.put(KEY, "DummyValue"); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "updateEntry", new Object[] { KEY, "ValueMatrix1" }); waitForValue(r, KEY, "ValueMatrix1"); }
public void testNotification_Valid_Destroy() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); r.put(KEY, "DummyValue"); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "destroyEntry", new Object[] { KEY }); waitForValue(r, KEY, null); // destroyed }
public void testNotification_Invalid_Update() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); invalidateEntry(KEY); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "updateEntry", new Object[] { KEY, "ValueMatrix1" }); waitForValue(r, KEY, "ValueMatrix1"); }
public void testNotification_Invalid_Destroy() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); invalidateEntry(KEY); r.registerInterest("ALL_KEYS", InterestResultPolicy.NONE); server1.invoke(DurableResponseMatrixDUnitTest.class, "destroyEntry", new Object[] { KEY }); waitForValue(r, KEY, null); // destroyed }
public void testRegisterInterestResponse_Valid_Valid() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); r.put(KEY, "ValueMatrix1"); r.registerInterest(KEY, InterestResultPolicy.KEYS_VALUES); assertEquals("ValueMatrix1", r.getEntry(KEY).getValue()); }
public void run2() throws CacheException { Region region = getRootRegion().getSubregion(regionName); region.registerInterest("ALL_KEYS"); getLogWriter().info("client2 registerInterest ALL_KEYS at "+region.getFullPath()); } });
public void BROKEN_testRegisterInterestResponse_Valid_Invalid() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); r.put(KEY, "ValueMatrix1"); server1.invoke(DurableResponseMatrixDUnitTest.class, "invalidateEntry", new Object[] { KEY }); r.registerInterest(KEY, InterestResultPolicy.KEYS_VALUES); assertEquals("ValueMatrix1", r.getEntry(KEY).getValue()); }
public void testRegisterInterestResponse_Invalid_Invalid() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); invalidateEntry(KEY); server1.invoke(DurableResponseMatrixDUnitTest.class, "invalidateEntry", new Object[] { KEY }); r.registerInterest(KEY, InterestResultPolicy.KEYS_VALUES); assertEquals(null, r.getEntry(KEY).getValue()); }
public void testRegisterInterestResponse_Destroyed_Valid() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); r.put(KEY, "DummyValue"); r.destroy(KEY); server1.invoke(DurableResponseMatrixDUnitTest.class, "updateEntry", new Object[] { KEY, "ValueMatrix1" }); r.registerInterest(KEY, InterestResultPolicy.KEYS_VALUES); assertEquals("ValueMatrix1", r.getEntry(KEY).getValue()); } public void testRegisterInterest_Destroy_Concurrent() throws Exception
public void run2() throws CacheException { Region region = getRootRegion().getSubregion(regionName); region.getAttributesMutator().addCacheListener(new MyListener(false)); // registerInterest for ALL_KEYS region.registerInterest("ALL_KEYS"); getLogWriter().info("client2 registerInterest ALL_KEYS at "+region.getFullPath()); } });
public void run2() throws CacheException { Region region = getRootRegion().getSubregion(regionName); region.getAttributesMutator().addCacheListener(new MyListener(false)); region.registerInterest("ALL_KEYS"); getLogWriter().info("client1 registerInterest ALL_KEYS at "+region.getFullPath()); } });
public void run2() throws CacheException { Region region = getRootRegion().getSubregion(regionName); region.getAttributesMutator().addCacheListener(new MyListener(false)); // registerInterest for ALL_KEYS region.registerInterest("ALL_KEYS"); getLogWriter().info("client2 registerInterest ALL_KEYS at "+region.getFullPath()); } });
public void testRegisterInterestResponse_Destroyed_Invalid() throws Exception { Region r = cache.getRegion(Region.SEPARATOR + REGION_NAME); r.put(KEY, "DummyValue"); r.destroy(KEY); server1.invoke(DurableResponseMatrixDUnitTest.class, "invalidateEntry", new Object[] { KEY }); r.registerInterest(KEY, InterestResultPolicy.KEYS_VALUES); assertFalse(r.containsValueForKey(KEY)); // invalidate assertEquals(null, r.getEntry(KEY).getValue()); // invalidate }