use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class RegionManagementDUnitTest method verifyReplicatedRegionAfterClose.
private void verifyReplicatedRegionAfterClose(final VM memberVM) {
memberVM.invoke("verifyReplicatedRegionAfterClose", () -> {
SystemManagementService service = getSystemManagementService_tmp();
RegionMXBean regionMXBean = service.getLocalRegionMBean(REGION_PATH);
assertThat(regionMXBean).isNull();
ObjectName objectName = service.getRegionMBeanName(getCache_tmp().getDistributedSystem().getDistributedMember(), REGION_PATH);
assertThat(service.getLocalManager().getManagementResourceRepo().getEntryFromLocalMonitoringRegion(objectName)).isNull();
});
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class RegionManagementDUnitTest method verifyProxyCleanup.
// <[javax.management.Notification[source=192.168.1.72(18496)<v27>-32770][type=gemfire.distributedsystem.cache.region.created][message=Region
// Created With Name /MANAGEMENT_TEST_REGION],
// javax.management.Notification[source=192.168.1.72(18497)<v28>-32771][type=gemfire.distributedsystem.cache.region.closed][message=Region
// Destroyed/Closed With Name /MANAGEMENT_TEST_REGION],
// javax.management.Notification[source=192.168.1.72(18498)<v29>-32772][type=gemfire.distributedsystem.cache.region.closed][message=Region
// Destroyed/Closed With Name /MANAGEMENT_TEST_REGION],
// javax.management.Notification[source=192.168.1.72(18499)<v30>-32773][type=gemfire.distributedsystem.cache.region.closed][message=Region
// Destroyed/Closed With Name /MANAGEMENT_TEST_REGION],
// javax.management.Notification[source=192.168.1.72(18496)<v27>-32770][type=gemfire.distributedsystem.cache.region.closed][message=Region
// Destroyed/Closed With Name /MANAGEMENT_TEST_REGION]]>
private void verifyProxyCleanup(final VM managerVM) {
managerVM.invoke("verifyProxyCleanup", () -> {
SystemManagementService service = getSystemManagementService_tmp();
Set<DistributedMember> otherMemberSet = getOtherNormalMembers_tmp();
for (final DistributedMember member : otherMemberSet) {
String alias = "Waiting for the proxy to get deleted at managing node";
await(alias).until(() -> assertThat(service.getMBeanProxy(service.getRegionMBeanName(member, REGION_PATH), RegionMXBean.class)).isNull());
}
});
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class RegionManagementDUnitTest method verifyReplicateRegionAfterCreate.
private void verifyReplicateRegionAfterCreate(final VM memberVM) {
memberVM.invoke("verifyReplicateRegionAfterCreate", () -> {
Cache cache = getCache_tmp();
String memberId = MBeanJMXAdapter.getMemberNameOrId(cache.getDistributedSystem().getDistributedMember());
ObjectName objectName = ObjectName.getInstance("GemFire:type=Member,member=" + memberId);
// List<Notification> notifications = new ArrayList<>();
// MEMBER_NOTIFICATIONS_REF.set(notifications);
//
// MemberNotificationListener listener = new MemberNotificationListener(notifications);
// ManagementFactory.getPlatformMBeanServer().addNotificationListener(objectName, listener,
// null, null);
SystemManagementService service = getSystemManagementService_tmp();
RegionMXBean regionMXBean = service.getLocalRegionMBean(REGION_PATH);
assertThat(regionMXBean).isNotNull();
Region region = cache.getRegion(REGION_PATH);
RegionAttributes regionAttributes = region.getAttributes();
RegionAttributesData regionAttributesData = regionMXBean.listRegionAttributes();
verifyRegionAttributes(regionAttributes, regionAttributesData);
MembershipAttributesData membershipData = regionMXBean.listMembershipAttributes();
assertThat(membershipData).isNotNull();
EvictionAttributesData evictionData = regionMXBean.listEvictionAttributes();
assertThat(evictionData).isNotNull();
});
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class RegionManagementDUnitTest method awaitMemberMXBeanProxy.
private MemberMXBean awaitMemberMXBeanProxy(final ObjectName objectName) {
SystemManagementService service = getSystemManagementService_tmp();
await().until(() -> assertThat(service.getMBeanProxy(objectName, MemberMXBean.class)).isNotNull());
return service.getMBeanProxy(objectName, MemberMXBean.class);
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class RegionManagementDUnitTest method awaitMemberMXBeanProxy.
private MemberMXBean awaitMemberMXBeanProxy(final DistributedMember member) {
SystemManagementService service = getSystemManagementService_tmp();
ObjectName objectName = service.getMemberMBeanName(member);
String alias = "awaiting MemberMXBean proxy for " + member;
await(alias).until(() -> assertThat(service.getMBeanProxy(objectName, MemberMXBean.class)).isNotNull());
return service.getMBeanProxy(objectName, MemberMXBean.class);
}
Aggregations