private void removeEntries(Region region, int start, int end) { for(int i = start; i < end ; i++) { region.remove(i); } } }
public void run() { region.remove("key1"); } }
public static Object removeMethod(Object obR){ Object objR=null; try{ if(obR != null){ objR = region.remove(obR); } }catch(Exception ex){ ex.printStackTrace(); fail("Failed while region.remove", ex); } return objR; }
public void run2() throws CacheException{ for (int i=1; i<5; i++){ region.put(new Integer(i), java.lang.Integer.toString(i)); } region.remove(new Integer(2)); } });
public static Object removeMethod(Object ob){ Object obj=null; try{ obj = region.remove(ob); }catch(Exception ex){ ex.printStackTrace(); fail("Failed while region.remove"); } return obj; }
public void testNullPointerWithRemove() { boolean caught = false; try { testRegion.remove(null); } catch (NullPointerException ex) { caught = true; } if (!caught) { fail("Nullpointer exception not thrown"); } }
public Object call() throws Exception { final Region r = getCache().getRegion(REP_REG_NAME); final Region pr = getCache().getRegion(PR_REG_NAME); assertFalse(r.remove("nonExistentkey", "value")); assertFalse(pr.remove("nonExistentkey", "value")); assertFalse(r.remove("keyForClient", "newValue")); assertFalse(pr.remove("keyForClient", "newValue")); assertTrue(r.remove("keyForClient", "value")); assertTrue(pr.remove("keyForClient", "value")); return null; } });
public void testRemoveReturnKey() { testRegion.put("Test","test"); if(!testRegion.remove("Test").equals("test")) { fail("remove did not return the correct value"); } }
public void unMarkForFederation(ObjectName objName) { synchronized (lock) { if (federatedComponentMap.get(objName) != null) { federatedComponentMap.remove(objName); } if (repo.getLocalMonitoringRegion() != null && repo.getLocalMonitoringRegion().get(objName.toString()) != null) { // To delete an entry from the region repo.getLocalMonitoringRegion().remove(objName.toString()); } } }
public boolean remove(Object key, Object value) { try { preOp(); return this.realRegion.remove(key, value); } finally { postOp(); } }
public void unMarkForFederation(ObjectName objName) { synchronized (lock) { if (federatedComponentMap.get(objName) != null) { federatedComponentMap.remove(objName); } if (repo.getLocalMonitoringRegion() != null && repo.getLocalMonitoringRegion().get(objName.toString()) != null) { // To delete an entry from the region repo.getLocalMonitoringRegion().remove(objName.toString()); } } }
public Object remove(Object key) { try { preOp(); return this.realRegion.remove(key); } finally { postOp(); } }
public boolean remove(Object key, Object value) { try { preOp(); return this.realRegion.remove(key, value); } finally { postOp(); } }
public static void doRemove(Region region) throws Exception { int temp=0; for(int i=(REMOVE-10); i<REMOVE; i++){ region.remove(new Integer(i)); temp++; } REMOVE = 50+temp; Log.getLogWriter().info("Performed put remove region: "+region.getName()); }//end of doRemove
@Override public void run() { Cache cache = getCache(); Region region = cache.getRegion(DATA_REGION_NAME_PATH); assertNotNull(region); assertEquals(true, region.containsKey(key)); region.remove(key); } };
public void testRemove() { testRegion.put("Test","test"); testRegion.remove("Test"); if(testRegion.containsKey("Test")) { fail("remove did not remove the key"); } }
@Override public void run2() throws CacheException { Cache cache2 = getCache(); Region<Object, Object> region = cache2.getRegion("/"+DS_REGION1_NAME); for (int i = 0; i < total; i++) { region.remove(keyPrefix+"-"+i); } pause(1000+100);//wait for sampler to update VMStats } });
public static void remove() { try { Region r = cache.getRegion("/" + REGION_NAME); assertNotNull(r); r.remove("key-1"); } catch (Exception ex) { fail("test failed due to exception in remove ", ex); } }
@Override public void run() { getMemcachedRegion(cache).remove(key); expiryFutures.remove(key); if (cache.getLogger().fineEnabled()) { cache.getLogger().fine("expiration removed key:"+key); } } }
@Override public void run() { getMemcachedRegion(cache).remove(key); expiryFutures.remove(key); if (cache.getLogger().fineEnabled()) { cache.getLogger().fine("expiration removed key:"+key); } } }