public class GatewaySenderHelper
extends java.lang.Object
| Constructor and Description |
|---|
GatewaySenderHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> |
createAndStartGatewaySenders(java.lang.String gatewaySenderConfig)
Creates and starts gateway senders in the current cache using the given
gateway sender configuration.
|
static void |
createGatewaySenderIds(java.lang.String gatewaySenderConfig)
Creates gateway sender ids for each remote distributed system for the
specified logical gateway sender configuration.
|
static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> |
createGatewaySenders(java.lang.String gatewaySenderConfig)
Creates gateway senders in the current cache.
|
static java.lang.String |
gatewaySenderToString(com.gemstone.gemfire.cache.wan.GatewaySender gs)
Returns the given gatewaySender as a string.
|
static int |
getDistributedSystemId() |
static java.lang.String |
getDistributedSystemName() |
static com.gemstone.gemfire.cache.wan.GatewaySender |
getGatewaySender(java.lang.String senderID)
Returns the gateway sender for the current cache matching the given
gateway sender id, or null if no matching gateway sender id exists.
|
static java.lang.String |
getGatewaySenderConfigName(java.lang.String id)
Returns the gateway sender configuration from the given gateway sender id.
|
static GatewaySenderDescription |
getGatewaySenderDescription(java.lang.String gatewaySenderConfig)
Returns the
GatewaySenderDescription with the given configuration
name from GatewaySenderPrms.names. |
static java.util.Set<java.lang.String> |
getGatewaySenderIds(java.lang.String gatewaySenderConfig)
Returns all gateway sender ids for the specified logical gateway sender
configuration that have been created using
(String) or createGatewaySenders(String), a possibly empty set. |
static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> |
getGatewaySenders()
Returns the gateway senders for the current cache, or null if no gateway
senders or cache exists.
|
static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> |
getGatewaySenders(java.lang.String gatewaySenderConfig)
Returns the gateway senders for the current cache matching the given
gateway sender configuration from
GatewaySenderPrms.names, or
null if no gateway senders or cache exist. |
static java.util.SortedSet<java.lang.String> |
getHubAndSpokeDistributedSystems()
Returns remote distributed system names from
#distributedSystem that satisfy a hub and spoke topology, a possibly
empty set. |
static java.util.Set<java.lang.String> |
getParallelGatewaySenderIds(java.lang.String gatewaySenderConfig)
Returns the parallel gateway sender ids for the specified logical gateway
sender configuration that have been created using
createGatewaySenderIds(String) or createGatewaySenders(String),
a possibly empty set. |
static java.util.SortedSet<java.lang.String> |
getRemoteDistributedSystems()
Returns all remote distributed system names from
#distributedSystem, a possibly empty set. |
static java.util.SortedSet<java.lang.String> |
getRingDistributedSystems()
Returns the next distributed system name alphabetically after this one,
wrapping around as needed, from
GemFirePrms.distributedSystem,
a possibly empty set. |
static java.util.Set<java.lang.String> |
getSerialGatewaySenderIds(java.lang.String gatewaySenderConfig)
Returns the serial gateway sender ids for the specified logical gateway
sender configuration that have been created using {@link #createGatewaySenderIds(String)} or {@link #createGatewaySenders
(String)}, a possibly empty set.
|
protected static void |
saveGatewaySenderId(java.lang.String gatewaySenderConfig,
boolean parallel,
java.lang.String id)
Stores the gateway sender id in the global GatewaySenderIds,
mapped by logical gateway sender configuration name.
|
static void |
startGatewaySenders()
Starts the existing gateway senders in the current cache, if they
have not already been started.
|
static void |
startGatewaySenders(java.lang.String gatewaySenderConfig)
Starts the gateway senders for the current cache matching the given
gateway sender configuration from
GatewaySenderPrms.names, if
they have not already been started. |
static void |
stopGatewaySenders()
Stops the gateway senders in the current cache, if any.
|
static void |
stopGatewaySenders(java.lang.String gatewaySenderConfig)
Stops the gateway senders in the current cache matching the given
gateway sender configuration from
GatewaySenderPrms.names, if any. |
public static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> createAndStartGatewaySenders(java.lang.String gatewaySenderConfig)
GatewaySenderPrms.manualStart
is false (default), each sender is started as soon as it is created.public static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> createGatewaySenders(java.lang.String gatewaySenderConfig)
#manualStart is false (default), each sender is started as soon as it
is created. The senders are configured using the GatewaySenderDescription corresponding to the given configuration from
GatewaySenderPrms.names.
One sender is created for each distributed system returned by GatewaySenderPrms.remoteDistributedSystemsAlgorithm. The id for each
sender is formed from its name as given in GatewaySenderPrms.names
plus the local and remote distributed systems. For example, a sender
named "fred" from local distributed system "ds_3" to remote distributed
system "ds_1" would have id set to "fred_ds_3_to_ds_1".
This method is thread-safe. The gateway senders for a given logical gateway sender configuration will only be created once.
HydraRuntimeException - if an attempt is made to reconfigure an
existing gateway sender.public static void startGatewaySenders()
HydraRuntimeException - if no gateway senders have been created.public static void startGatewaySenders(java.lang.String gatewaySenderConfig)
GatewaySenderPrms.names, if
they have not already been started.HydraRuntimeException - if no gateway senders have been created.public static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> getGatewaySenders()
public static com.gemstone.gemfire.cache.wan.GatewaySender getGatewaySender(java.lang.String senderID)
public static java.util.Set<com.gemstone.gemfire.cache.wan.GatewaySender> getGatewaySenders(java.lang.String gatewaySenderConfig)
GatewaySenderPrms.names, or
null if no gateway senders or cache exist.public static void stopGatewaySenders()
public static void stopGatewaySenders(java.lang.String gatewaySenderConfig)
GatewaySenderPrms.names, if any.public static java.lang.String gatewaySenderToString(com.gemstone.gemfire.cache.wan.GatewaySender gs)
public static GatewaySenderDescription getGatewaySenderDescription(java.lang.String gatewaySenderConfig)
GatewaySenderDescription with the given configuration
name from GatewaySenderPrms.names.public static java.util.SortedSet<java.lang.String> getRemoteDistributedSystems()
#distributedSystem, a possibly empty set.public static java.util.SortedSet<java.lang.String> getRingDistributedSystems()
GemFirePrms.distributedSystem,
a possibly empty set.public static java.util.SortedSet<java.lang.String> getHubAndSpokeDistributedSystems()
#distributedSystem that satisfy a hub and spoke topology, a possibly
empty set. One distributed system, the first alphabetically, is
chosen as the hub, for which all remote distributed systems are returned,
while for non-hubs, only the hub is returned.public static int getDistributedSystemId()
public static java.lang.String getDistributedSystemName()
public static void createGatewaySenderIds(java.lang.String gatewaySenderConfig)
public static java.util.Set<java.lang.String> getGatewaySenderIds(java.lang.String gatewaySenderConfig)
(String) or createGatewaySenders(String), a possibly empty set.public static java.util.Set<java.lang.String> getSerialGatewaySenderIds(java.lang.String gatewaySenderConfig)
#createGatewaySenderIds(String)} or {@link #createGatewaySenders
(String)}, a possibly empty set.
#createGatewaySenders(String), a possibly empty list.public static java.util.Set<java.lang.String> getParallelGatewaySenderIds(java.lang.String gatewaySenderConfig)
createGatewaySenderIds(String) or createGatewaySenders(String),
a possibly empty set.protected static void saveGatewaySenderId(java.lang.String gatewaySenderConfig,
boolean parallel,
java.lang.String id)
public static java.lang.String getGatewaySenderConfigName(java.lang.String id)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.