use of org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier in project geode by apache.
the class ClientHealthStatsDUnitTest method verifyStats.
/**
* Invoked in serverVM
*/
private void verifyStats(final int serverPort) throws Exception {
ManagementService service = this.managementTestRule.getManagementService();
CacheServerMXBean serverBean = service.getLocalCacheServerMXBean(serverPort);
CacheClientNotifier clientNotifier = CacheClientNotifier.getInstance();
CacheClientProxy clientProxy = clientNotifier.getClientProxies().iterator().next();
assertThat(clientProxy.getQueueSizeStat()).isEqualTo(clientProxy.getQueueSize());
ClientQueueDetail queueDetails = serverBean.showClientQueueDetails()[0];
assertThat(clientProxy.getQueueSizeStat()).isEqualTo((int) queueDetails.getQueueSize());
}
use of org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier in project geode by apache.
the class ClientHealthStatsDUnitTest method cacheClientProxyHasBeenPause.
/**
* Invoked in serverVM
*/
private boolean cacheClientProxyHasBeenPause() {
CacheClientNotifier clientNotifier = CacheClientNotifier.getInstance();
Collection<CacheClientProxy> clientProxies = clientNotifier.getClientProxies();
for (CacheClientProxy clientProxy : clientProxies) {
if (clientProxy.isPaused()) {
return true;
}
}
return false;
}
Aggregations