private static boolean regionExists(Cache cache, String regionPath) { boolean regionFound = false; if (regionPath != null && !Region.SEPARATOR.equals(regionPath)) { ManagementService managementService = ManagementService.getExistingManagementService(cache); DistributedSystemMXBean dsMBean = managementService.getDistributedSystemMXBean(); String[] allRegionPaths = dsMBean.listAllRegionPaths(); for (int i = 0; i < allRegionPaths.length; i++) { if (allRegionPaths[i].equals(regionPath)) { regionFound = true; break; } } } return regionFound; }
private static boolean regionExists(Cache cache, String regionPath) { boolean regionFound = false; if (regionPath != null && !Region.SEPARATOR.equals(regionPath)) { ManagementService managementService = ManagementService.getExistingManagementService(cache); DistributedSystemMXBean dsMBean = managementService.getDistributedSystemMXBean(); String[] allRegionPaths = dsMBean.listAllRegionPaths(); for (int i = 0; i < allRegionPaths.length; i++) { if (allRegionPaths[i].equals(regionPath)) { regionFound = true; break; } } } return regionFound; }
@Override public boolean done() { final ManagementService service = getManagementService(); final DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); if(bean !=null){ if (bean.listCacheServers().length > 0) { return true; } } return false; } @Override
@Override public boolean done() { final ManagementService service = getManagementService(); final DistributedSystemMXBean bean = service .getDistributedSystemMXBean(); if (bean != null) { if (bean.getNumClients() > 0) { return true; } } return false; }
@Override public boolean done() { final ManagementService service = getManagementService(); final DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); if (bean != null) { if(bean.getActiveCQCount() > 0){ return true; } } return false; }
@Override public boolean done() { final ManagementService service = getManagementService(); final DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); if (bean != null) { if(bean.getLocatorCount() > 0){ return true; } } return false; }
private boolean diskStoreExists(Cache cache, String diskStoreName) { ManagementService managementService = ManagementService.getExistingManagementService(cache); DistributedSystemMXBean dsMXBean = managementService.getDistributedSystemMXBean(); Map<String, String[]> diskstore = dsMXBean.listMemberDiskstore(); Set<Entry<String, String[]>> entrySet = diskstore.entrySet(); for (Entry<String, String[]> entry : entrySet) { String[] value = entry.getValue(); if (CliUtil.contains(value, diskStoreName)) { return true; } } return false; }
@Override public boolean done() { final ManagementService service = getManagementService(); final DistributedSystemMXBean bean = service .getDistributedSystemMXBean(); if (bean != null) { if (bean.getTotalHeapSize() > 0) { return true; } } return false; } @Override
private boolean diskStoreExists(Cache cache, String diskStoreName) { ManagementService managementService = ManagementService.getExistingManagementService(cache); DistributedSystemMXBean dsMXBean = managementService.getDistributedSystemMXBean(); Map<String, String[]> diskstore = dsMXBean.listMemberDiskstore(); Set<Entry<String, String[]>> entrySet = diskstore.entrySet(); for (Entry<String, String[]> entry : entrySet) { String[] value = entry.getValue(); if (CliUtil.contains(value, diskStoreName)) { return true; } } return false; }
@Override public boolean done() { final ManagementService service = getManagementService(); final DistributedSystemMXBean bean = service .getDistributedSystemMXBean(); if (bean != null) { if (bean.getNumRunningFunctions() > 0) { return true; } else { return false; } } return false; }
public Object call() throws Exception { ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); DiskBackupStatus status = bean.backupAllMembers(getBackupDir("test_backupAllMembers") .getAbsolutePath()); return null; } });
public Object call() throws Exception { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); assertNotNull(service.getDistributedSystemMXBean()); bean.shutDownAllMembers(); staticPause(2000); assertEquals( cache.getDistributedSystem().getAllOtherMembers().size(), 1); return null; } });
private boolean diskStoreExists(String diskStoreName) { Cache cache = getCache(); ManagementService managementService = ManagementService.getExistingManagementService(cache); DistributedSystemMXBean dsMXBean = managementService.getDistributedSystemMXBean(); Map<String, String[]> diskstore = dsMXBean.listMemberDiskstore(); Set<Entry<String, String[]>> entrySet = diskstore.entrySet(); for (Entry<String, String[]> entry : entrySet) { String[] value = entry.getValue(); if (CliUtil.contains(value, diskStoreName)) { return true; } } return false; }
private boolean diskStoreExists(String diskStoreName) { Cache cache = getCache(); ManagementService managementService = ManagementService.getExistingManagementService(cache); DistributedSystemMXBean dsMXBean = managementService.getDistributedSystemMXBean(); Map<String, String[]> diskstore = dsMXBean.listMemberDiskstore(); Set<Entry<String, String[]>> entrySet = diskstore.entrySet(); for (Entry<String, String[]> entry : entrySet) { String[] value = entry.getValue(); if (CliUtil.contains(value, diskStoreName)) { return true; } } return false; }
public void run() { final ManagementService service = getManagementService(); DistributedSystemMXBean disMBean = service.getDistributedSystemMXBean(); try { ObjectName expected = MBeanJMXAdapter.getDiskStoreMBeanName(diskMember.getId(), diskStoreName); ObjectName actual = disMBean.fetchDiskStoreObjectName(diskMember.getId(), diskStoreName); assertEquals(expected, actual); } catch (Exception e) { fail("Disk Store Navigation Failed " + e); } } };
public Object call() throws Exception { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); assertNotNull(bean); bean.changeAlertLevel(alertLevel); return null; } });
public void run() { Cache cache = getCache(); ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); PersistentMemberDetails[] missingDiskStores = bean .listMissingDiskStores(); assertNull(missingDiskStores); } });
public void run() { Cache cache = GemFireCacheImpl.getInstance(); assertNotNull(cache); ManagementService service = ManagementService .getExistingManagementService(cache); assertNotNull(service); assertTrue(service.isManager()); LocatorMXBean bean = service.getLocalLocatorMXBean(); assertEquals(locatorPort, bean.getPort()); DistributedSystemMXBean dsBean = service.getDistributedSystemMXBean(); ObjectName[] names = dsBean.listMemberObjectNames(); assertEquals(2,dsBean.listMemberObjectNames().length); } });
public Object call() throws Exception { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); AlertNotifListener nt = AlertNotifListener.getInstance(); nt.resetCount(); mbeanServer.addNotificationListener(MBeanJMXAdapter .getDistributedSystemName(), nt, null, null); return null; } });
public Object call() throws Exception { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); ManagementService service = getManagementService(); DistributedSystemMXBean bean = service.getDistributedSystemMXBean(); assertNotNull(bean); TestDistributedSystemNotif nt = new TestDistributedSystemNotif(); mbeanServer.addNotificationListener(MBeanJMXAdapter .getDistributedSystemName(), nt, null, null); return null; } });