GemFire 5.5.1

com.gemstone.gemfire.cache.util
Class BridgeMembership

java.lang.Object
  extended by com.gemstone.gemfire.cache.util.BridgeMembership

public final class BridgeMembership
extends Object

Provides utility methods for registering and unregistering BridgeMembershipListeners in this process.

Since:
4.2.1

Method Summary
static BridgeMembershipListener[] getBridgeMembershipListeners()
          Returns an array of all the currently registered BridgeMembershipListeners.
static Map getClientQueueSizes()
           
static Map getConnectedClients()
          Caller must synchronize on cache.allBridgeServersLock
static Map getConnectedClients(boolean onlyClientsNotifiedByThisServer)
          Returns a map of client memberIds to count of connections to that client.
static Map getConnectedIncomingGateways()
           
static Map getConnectedServers()
          Returns a map of servers to List of active endpoints to that server.
static void registerBridgeMembershipListener(BridgeMembershipListener listener)
          Registers a BridgeMembershipListener for notification of connection changes for BridgeServers and bridge clients.
static void unregisterBridgeMembershipListener(BridgeMembershipListener listener)
          Removes registration of a previously registered BridgeMembershipListener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerBridgeMembershipListener

public static void registerBridgeMembershipListener(BridgeMembershipListener listener)
Registers a BridgeMembershipListener for notification of connection changes for BridgeServers and bridge clients.

Parameters:
listener - a BridgeMembershipListener to be registered

unregisterBridgeMembershipListener

public static void unregisterBridgeMembershipListener(BridgeMembershipListener listener)
Removes registration of a previously registered BridgeMembershipListener.

Parameters:
listener - a BridgeMembershipListener to be unregistered

getBridgeMembershipListeners

public static BridgeMembershipListener[] getBridgeMembershipListeners()
Returns an array of all the currently registered BridgeMembershipListeners. Modifications to the returned array will not effect the registration of these listeners.

Returns:
the registered BridgeMembershipListeners; an empty array if no listeners

getConnectedClients

public static Map getConnectedClients(boolean onlyClientsNotifiedByThisServer)
Returns a map of client memberIds to count of connections to that client. The map entry key is a String representation of the client memberId, and the map entry value is an Integer count of connections to that client. Since a single client can have multiple ConnectionProxy objects, this map will contain all the Connection objects across the ConnectionProxies

Parameters:
onlyClientsNotifiedByThisServer - true will return only those clients that are actively being updated by this server
Returns:
map of client memberIds to count of connections to that client

getConnectedClients

public static Map getConnectedClients()
Caller must synchronize on cache.allBridgeServersLock

Returns:
all the clients

getClientQueueSizes

public static Map getClientQueueSizes()

getConnectedServers

public static Map getConnectedServers()
Returns a map of servers to List of active endpoints to that server. The map entry key is a String representation of the server, and the map entry value is a List of active endpoints to that server. If the endpoint is not alive, the entry in the map contains a 0 for a value (denoting a dead server).

Returns:
map of servers to List of active endpoints to that server

getConnectedIncomingGateways

public static Map getConnectedIncomingGateways()

GemFire 5.5.1

Copyright © 2002-2008 GemStone Systems, Inc. All Rights Reserved.