|
GemFire 5.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface GatewayHub
A GatewayHub manages a collection of Gateways.
Gateway| Field Summary | |
|---|---|
static int |
DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS
The default maximum amount of time between client pings. |
static int |
DEFAULT_SOCKET_BUFFER_SIZE
The default buffer size for socket buffers from a sending GatewayHub to the receiving one. |
static String |
DEFAULT_STARTUP_POLICY
The default startup policy ( STARTUP_POLICY_NONE). |
static String |
STARTUP_POLICY_NONE
The 'none' startup policy. |
static String |
STARTUP_POLICY_PRIMARY
The 'primary' startup policy. |
static String |
STARTUP_POLICY_SECONDARY
The 'secondary' startup policy. |
static int |
STARTUP_POLICY_SECONDARY_WAIT
The amount of time in milliseconds a GatewayHub defined with
secondary startup policy waits for a primary GatewayHub to
start before logging a warning and becoming the primary
GatewayHub itself. |
| Method Summary | |
|---|---|
Gateway |
addGateway(String id)
Adds a Gateway to this GatewayHub's
known Gateways. |
Object |
getAllGatewaysLock()
Return a mutex to lock when iterating over the list of gateways |
Cache |
getCache()
Returns this GatewayHub's GemFire cache |
List |
getGatewayIds()
Returns the ids of this GatewayHub's list of known
Gateways |
List |
getGateways()
Returns this GatewayHub's list of known
Gateways |
String |
getId()
Returns the identifier of this GatewayHub |
int |
getMaximumTimeBetweenPings()
Returns the maximum amount of time between client pings. |
int |
getPort()
Returns the port on which this GatewayHub listens for
remote connections |
int |
getSocketBufferSize()
Returns the configured buffer size of the socket connection for this GatewayHub. |
String |
getStartupPolicy()
Returns the startup policy for this GatewayHub. |
boolean |
isPrimary()
Returns whether this GatewayHub is the primary hub. |
boolean |
isRunning()
Returns whether this GatewayHub is running |
void |
removeGateway(String id)
Removes a Gateway from this GatewayHub. |
void |
setId(String id)
Sets the identifier for this GatewayHub |
void |
setMaximumTimeBetweenPings(int maximumTimeBetweenPings)
Sets the maximum amount of time between client pings. |
void |
setPort(int port)
Sets the port on which this GatewayHub listens for
remote connections |
void |
setSocketBufferSize(int socketBufferSize)
Sets the buffer size in bytes of the socket connection for this GatewayHub. |
void |
setStartupPolicy(String startupPolicy)
Sets the startup policy for this GatewayHub. |
void |
start()
Starts this GatewayHub and notifies all of its
Gateways to start. |
void |
start(boolean startGateways)
Starts this GatewayHub and notifies all of its
Gateways to start if requested. |
void |
startGateways()
Notifies all of this GatewayHub's Gateways to
start. |
void |
stop()
Stops this GatewayHub by stopping its listener and
notifying each of its Gateways to stop. |
void |
stopGateways()
Notifies all of this GatewayHub's Gateways to
stop. |
String |
toDetailedString()
Returns detailed string representation of this GatewayHub. |
| Field Detail |
|---|
static final int DEFAULT_SOCKET_BUFFER_SIZE
GatewayHub to the receiving one.
static final int DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS
ClientHealthMonitor to determine the
health of this GatewayHub's clients.
static final String STARTUP_POLICY_NONE
GatewayHub. If it can become the primary
GatewayHub, it will. If not, then it will become a secondary
GatewayHub.
static final String STARTUP_POLICY_PRIMARY
GatewayHub. If it can become the primary
GatewayHub, it will. If not, then it will log a warning
and become a secondary GatewayHub.
static final String STARTUP_POLICY_SECONDARY
STARTUP_POLICY_SECONDARY_WAIT milliseconds for another VM to
start as the primary GatewayHub. If another VM does start as
the primary GatewayHub within
STARTUP_POLICY_SECONDARY_WAIT milliseconds, then this VM will
start as a secondary GatewayHub. If not, then it will log a
warning and start as the primary GatewayHub.
static final String DEFAULT_STARTUP_POLICY
STARTUP_POLICY_NONE).
static final int STARTUP_POLICY_SECONDARY_WAIT
GatewayHub defined with
secondary startup policy waits for a primary GatewayHub to
start before logging a warning and becoming the primary
GatewayHub itself. This value is 60000 milliseconds.
| Method Detail |
|---|
int getPort()
GatewayHub listens for
remote connections
GatewayHub listens for
remote connectionsvoid setPort(int port)
GatewayHub listens for
remote connections
port - The port on which this GatewayHub listens
for remote connectionsvoid setId(String id)
GatewayHub
id - The identifier for this GatewayHubString getId()
GatewayHub
GatewayHubvoid setSocketBufferSize(int socketBufferSize)
GatewayHub. The default is 32768 bytes.
socketBufferSize - The size in bytes of the socket bufferint getSocketBufferSize()
GatewayHub. The default is 32768 bytes.
GatewayHubvoid setMaximumTimeBetweenPings(int maximumTimeBetweenPings)
ClientHealthMonitor to determine the health
of any foreign Gateways connected to this
GatewayHub. The default is 60000 ms.
maximumTimeBetweenPings - The maximum amount of time between client
pingsint getMaximumTimeBetweenPings()
ClientHealthMonitor to determine the health
of any foreign Gateways connected to this
GatewayHub. The default is 60000 ms.
void start()
throws IOException
GatewayHub and notifies all of its
Gateways to start. Once the hub is running, its
configuration cannot be changed.
IOException - If an error occurs while starting the
GatewayHub
void start(boolean startGateways)
throws IOException
GatewayHub and notifies all of its
Gateways to start if requested. Once the hub is running,
its configuration cannot be changed.
startGateways - Whether to notify the Gateways to
start
IOException
void startGateways()
throws IOException
GatewayHub's Gateways to
start.
IOExceptionvoid stopGateways()
GatewayHub's Gateways to
stop.
boolean isRunning()
GatewayHub is running
void stop()
GatewayHub by stopping its listener and
notifying each of its Gateways to stop. Note that the
GatewayHub can be reconfigured and restarted if
desired.
Cache getCache()
GatewayHub's GemFire cache
GatewayHub's GemFire cache
Gateway addGateway(String id)
throws GatewayException
Gateway to this GatewayHub's
known Gateways.
id - The id of the Gateway
Gateway
GatewayException - if this GatewayHub already defines
a Gateway with this id
void removeGateway(String id)
throws GatewayException
Gateway from this GatewayHub.
id - The id of the Gateway
GatewayException - if this GatewayHub does not contain
a Gateway with this idList getGateways()
GatewayHub's list of known
Gateways
GatewayHub's list of known
GatewaysList getGatewayIds()
GatewayHub's list of known
Gateways
GatewayHub's list of known
Gatewaysboolean isPrimary()
GatewayHub is the primary hub.
GatewayHub is the primary hubString toDetailedString()
void setStartupPolicy(String startupPolicy)
throws GatewayException
GatewayHub.
startupPolicy - the startup policy for this GatewayHub
GatewayException - if the input startup policy is not valid.String getStartupPolicy()
GatewayHub.
GatewayHubObject getAllGatewaysLock()
|
GemFire 5.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||