Search in sources :

Example 16 with CacheClientNotifier

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());
}
Also used : CacheClientProxy(org.apache.geode.internal.cache.tier.sockets.CacheClientProxy) SystemManagementService(org.apache.geode.management.internal.SystemManagementService) CacheClientNotifier(org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier)

Example 17 with CacheClientNotifier

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;
}
Also used : CacheClientProxy(org.apache.geode.internal.cache.tier.sockets.CacheClientProxy) CacheClientNotifier(org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier)

Aggregations

CacheClientNotifier (org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier)17 CacheClientProxy (org.apache.geode.internal.cache.tier.sockets.CacheClientProxy)11 Cache (org.apache.geode.cache.Cache)4 IOException (java.io.IOException)3 CachedRegionHelper (org.apache.geode.internal.cache.tier.CachedRegionHelper)3 Set (java.util.Set)2 DefaultQuery (org.apache.geode.cache.query.internal.DefaultQuery)2 CqService (org.apache.geode.cache.query.internal.cq.CqService)2 CacheServerImpl (org.apache.geode.internal.cache.CacheServerImpl)2 AcceptorImpl (org.apache.geode.internal.cache.tier.sockets.AcceptorImpl)2 ClientProxyMembershipID (org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID)2 Part (org.apache.geode.internal.cache.tier.sockets.Part)2 AuthorizeRequest (org.apache.geode.internal.security.AuthorizeRequest)2 MemberResult (org.apache.geode.management.internal.cli.domain.MemberResult)2 Iterator (java.util.Iterator)1 CancelCriterion (org.apache.geode.CancelCriterion)1 EvictionAttributes (org.apache.geode.cache.EvictionAttributes)1 Region (org.apache.geode.cache.Region)1 RegionAttributes (org.apache.geode.cache.RegionAttributes)1 Pool (org.apache.geode.cache.client.Pool)1