public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); assertEquals("B", region.get("A")); } };
public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); region.close(); } };
public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); region.put("A", value); } });
public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); region.put("A", "B"); } });
public void run() { Cache cache = getCache(); ManagementService service = getManagementService(); DiskStoreMXBean bean = service.getLocalDiskStoreMBean(REGION_NAME); assertNotNull(bean); } };
public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); DistributedRegion distributedRegion = (DistributedRegion) region; DiskRegionStats stats = distributedRegion.getDiskRegion().getStats(); if (localRecovery) { assertEquals(1, stats.getLocalInitializations()); assertEquals(0, stats.getRemoteInitializations()); } else { assertEquals(0, stats.getLocalInitializations()); assertEquals(1, stats.getRemoteInitializations()); } } });
public void run() { Cache cache = getCache(); ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); PersistentMemberDetails[] missingDiskStores = bean .listMissingDiskStores(); assertNull(missingDiskStores); } });
public void run() { Cache cache = getCache(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); dsf.setAllowForceCompaction(true); String name = "testForceCompaction_" + vm.getPid(); DiskStore ds = dsf.create(name); ManagementService service = getManagementService(); DiskStoreMXBean bean = service.getLocalDiskStoreMBean(name); assertNotNull(bean); assertEquals(false, bean.forceCompaction()); } };
public void run() { Cache cache = getCache(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); String name = "testForceRoll_" + vm.getPid(); DiskStore ds = dsf.create(name); ManagementService service = getManagementService(); DiskStoreMXBean bean = service.getLocalDiskStoreMBean(name); assertNotNull(bean); bean.forceRoll(); } };
public void run() { Cache cache = getCache(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); String name = "testFlush_" + vm.getPid(); DiskStore ds = dsf.create(name); ManagementService service = getManagementService(); DiskStoreMXBean bean = service.getLocalDiskStoreMBean(name); assertNotNull(bean); bean.flush(); } };
public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); DiskRegion dr = ((LocalRegion) region).getDiskRegion(); getLogWriter().info("putting key1"); region.put("key1", "value1"); getLogWriter().info("putting key2"); region.put("key2", "value2"); getLogWriter().info("removing key2"); region.remove("key2"); // now that it is compactable the following forceCompaction should // go ahead and do a roll and compact it. } });
public void run() { Cache cache = getCache(); DiskStoreFactory dsf = cache.createDiskStoreFactory(); File dir = getDiskDirForVM(vm); dir.mkdirs(); dsf.setDiskDirs(new File[] { dir }); dsf.setMaxOplogSize(1); dsf.setAllowForceCompaction(true); dsf.setAutoCompact(false); DiskStore ds = dsf.create(REGION_NAME); RegionFactory rf = cache.createRegionFactory(); rf.setDiskStoreName(ds.getName()); rf.setDiskSynchronous(true); rf.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); rf.setScope(Scope.DISTRIBUTED_ACK); rf.create(REGION_NAME); } };
public void run() { Cache cache = getCache(); GemFireCacheImpl cacheImpl = (GemFireCacheImpl) cache; ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); PersistentMemberDetails[] missingDiskStores = bean .listMissingDiskStores(); getLogWriter().info("waiting members=" + missingDiskStores); assertNotNull(missingDiskStores); assertEquals(1, missingDiskStores.length); for (PersistentMemberDetails id : missingDiskStores) { getLogWriter().info("Missing DiskStoreID is =" + id.getDiskStoreId()); getLogWriter().info("Missing Host is =" + id.getHost()); getLogWriter().info("Missing Directory is =" + id.getDirectory()); try { bean.revokeMissingDiskStores(id.getDiskStoreId()); } catch (Exception e) { fail("revokeMissingDiskStores failed with exception " + e); } } } });