@Override public void putAll(Map<Object, Object> map) { try { getRegion().putAll(map); } catch (IOException e) { logger.info("while putting all in region", e); } }
public void run2() throws CacheException { Region r = getRootRegion("ProxyDUnitTest"); Map m = new HashMap(); m.put("putAllKey1", "putAllValue1"); m.put("putAllKey2", "putAllValue2"); r.putAll(m); } });
@Override protected void doPutAll(final String uniqueName, Map map) { Region r = getRootRegion(uniqueName); r.putAll(map); }
public void testNullPointerWithPutAll() { boolean caught = false; try { testRegion.putAll(null); } catch (NullPointerException ex) { caught = true; } if (!caught) { fail("Nullpointer exception not thrown"); } }
/** * uses putAll operation of region * * @param objectMap * Object Map containing key-value operations */ public void putAllInLocalMonitoringRegion( Map<String, FederationComponent> objectMap) { if (localMonitoringRegion != null && !localMonitoringRegion.isDestroyed()) { localMonitoringRegion.putAll(objectMap); } }
@Override public void putAll(Map<Object, Object> map) { try { getRegion().putAll(map); } catch (IOException e) { logger.info("while putting all in region", e); } }
public static void doPutAll(String regionName, int numPuts, int size) { Region r = cache.getRegion(Region.SEPARATOR + regionName); assertNotNull(r); for (long i = 0; i < numPuts; i++) { Map putAllMap = new HashMap(); for(long j =0; j< size; j++) { putAllMap.put((size* i)+j,i); } r.putAll(putAllMap); putAllMap.clear(); } }
public Object call() throws Exception { Region region = getCache().getRegion("region"); Map map = new HashMap(); map.put(0, "a"); map.put(113, "b"); region.putAll(map); return null; } });
public void run() { Cache cache = getCache(); Region region = cache.getRegion("region1"); for(int i =0; i < 12; i++) { Map m = new HashMap(); for (int j = 0; j < 200; j++) { m.put(Integer.valueOf(i + 113*j), "A"); } region.putAll(m); } } });
public void testPutAll() { HashMap map = new HashMap(); for(int i=0 ; i < 5 ; i++) { map.put(new Integer(i), new Integer(i)); } testRegion.putAll(map); if(!testRegion.containsKey(new Integer(4))|| !testRegion.containsValue(new Integer(4))) { fail("Put all did not put in all the keys"); } }
@Override public void putAll(Map map, Object callbackArg) { try { preOp(); this.realRegion.putAll(map, callbackArg); } finally { postOp(); } }
public void putAll(Map map) { try { preOp(); this.realRegion.putAll(map); } finally { postOp(); } }
/** For each available root region, do a putAll with the given putAll argument * * @param putAllMap The map to use for the putAll */ private void putToAllRegions(Map putAllMap) { for (Region aRegion: CacheHelper.getCache().rootRegions()) { //Log.getLogWriter().info("Putting putAll map of size " + putAllMap.size() + " into " + aRegion.getFullPath() + // ", keys of putAll map are: " + keySet); aRegion.putAll(putAllMap); } }
protected Region doPutAll(String regionName, String keyStub, int numEntries) { Region region = getRootRegion().getSubregion(regionName); LinkedHashMap map = new LinkedHashMap(); for (int i=0; i<numEntries; i++) { map.put(keyStub+i, new TestObject(i)); } region.putAll(map); return region; }
public void run2() throws CacheException { Region region1 = getRootRegion().getSubregion(regionName); Map m = new HashMap(); for (int i = 1; i <= size; i++) { m.put(KEY+i, new Portfolio(i)); } region1.putAll(m); getLogWriter().info("### Number of Entries in Region :" + region1.keys().size()); } });
public Object call() throws Exception { Region region = getCache().getRegion("region"); Map map = new HashMap(); map.put(0, "a"); map.put(113, "b"); region.putAll(map); RegionEntry entry = ((LocalRegion)region).getRegionEntry(0); assertNotNull(entry); assertNotNull(entry.getVersionStamp()); assertEquals(2, entry.getVersionStamp().getEntryVersion()); return null; } });
/**** * Loads the * @throws Exception */ public void loadSharedConfigurationFromDisk() throws Exception { Map<String, Configuration> sharedConfigurationMap = readSharedConfigurationFromDisk(); getConfigurationRegion().clear(); getConfigurationRegion().putAll(sharedConfigurationMap); }
public void setUp() throws Exception { super.setUp(); loadCache(); RegionGenerator rgen = new RegionGenerator(); for (final RegionType rt : RegionType.values()) { for (final SerializationType st : SerializationType.values()) { Region<Integer, MyObject> region = getCache().getRegion("test-" + rt.name() + "-" + st.name()); region.putAll(createExpected(st, rgen)); } } }