Search in sources :

Example 1 with EndpointManager

use of org.apache.geode.cache.client.internal.EndpointManager in project geode by apache.

the class UpdatePropagationDUnitTest method hasEndPointWithPort.

/**
   * Check to see if a client is connected to an endpoint with a specific port
   */
private boolean hasEndPointWithPort(final PoolImpl pool, final int port) {
    EndpointManager endpointManager = pool.getEndpointManager();
    final Set<ServerLocation> servers = endpointManager.getEndpointMap().keySet();
    return servers.stream().anyMatch(location -> location.getPort() == port);
}
Also used : ServerLocation(org.apache.geode.distributed.internal.ServerLocation) EndpointManager(org.apache.geode.cache.client.internal.EndpointManager)

Aggregations

EndpointManager (org.apache.geode.cache.client.internal.EndpointManager)1 ServerLocation (org.apache.geode.distributed.internal.ServerLocation)1