public class GatewaySenderHelper extends Object
| Constructor and Description |
|---|
GatewaySenderHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Set<com.gemstone.gemfire.cache.wan.GatewaySender> |
createAndStartGatewaySenders(String gatewaySenderConfig)
Creates and starts gateway senders in the current cache using the given
gateway sender configuration.
|
static void |
createGatewaySenderIds(String gatewaySenderConfig)
Creates gateway sender ids for each remote distributed system for the
specified logical gateway sender configuration.
|
static Set<com.gemstone.gemfire.cache.wan.GatewaySender> |
createGatewaySenders(String gatewaySenderConfig)
Creates gateway senders in the current cache.
|
static String |
gatewaySenderToString(com.gemstone.gemfire.cache.wan.GatewaySender gs)
Returns the given gatewaySender as a string.
|
static int |
getDistributedSystemId() |
static String |
getDistributedSystemName() |
static com.gemstone.gemfire.cache.wan.GatewaySender |
getGatewaySender(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 String |
getGatewaySenderConfigName(String id)
Returns the gateway sender configuration from the given gateway sender id.
|
static GatewaySenderDescription |
getGatewaySenderDescription(String gatewaySenderConfig)
Returns the
GatewaySenderDescription with the given configuration
name from GatewaySenderPrms.names. |
static Set<String> |
getGatewaySenderIds(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 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 Set<com.gemstone.gemfire.cache.wan.GatewaySender> |
getGatewaySenders(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 SortedSet<String> |
getHubAndSpokeDistributedSystems()
Returns remote distributed system names from
#distributedSystem that satisfy a hub and spoke topology, a possibly
empty set. |
static Set<String> |
getParallelGatewaySenderIds(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 SortedSet<String> |
getRemoteDistributedSystems()
Returns all remote distributed system names from
#distributedSystem, a possibly empty set. |
static SortedSet<String> |
getRingDistributedSystems()
Returns the next distributed system name alphabetically after this one,
wrapping around as needed, from
GemFirePrms.distributedSystem,
a possibly empty set. |
static Set<String> |
getSerialGatewaySenderIds(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(String gatewaySenderConfig,
boolean parallel,
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(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(String gatewaySenderConfig)
Stops the gateway senders in the current cache matching the given
gateway sender configuration from
GatewaySenderPrms.names, if any. |
public static Set<com.gemstone.gemfire.cache.wan.GatewaySender> createAndStartGatewaySenders(String gatewaySenderConfig)
GatewaySenderPrms.manualStart
is false (default), each sender is started as soon as it is created.public static Set<com.gemstone.gemfire.cache.wan.GatewaySender> createGatewaySenders(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(String gatewaySenderConfig)
GatewaySenderPrms.names, if
they have not already been started.HydraRuntimeException - if no gateway senders have been created.public static Set<com.gemstone.gemfire.cache.wan.GatewaySender> getGatewaySenders()
public static com.gemstone.gemfire.cache.wan.GatewaySender getGatewaySender(String senderID)
public static Set<com.gemstone.gemfire.cache.wan.GatewaySender> getGatewaySenders(String gatewaySenderConfig)
GatewaySenderPrms.names, or
null if no gateway senders or cache exist.public static void stopGatewaySenders()
public static void stopGatewaySenders(String gatewaySenderConfig)
GatewaySenderPrms.names, if any.public static String gatewaySenderToString(com.gemstone.gemfire.cache.wan.GatewaySender gs)
public static GatewaySenderDescription getGatewaySenderDescription(String gatewaySenderConfig)
GatewaySenderDescription with the given configuration
name from GatewaySenderPrms.names.public static SortedSet<String> getRemoteDistributedSystems()
#distributedSystem, a possibly empty set.public static SortedSet<String> getRingDistributedSystems()
GemFirePrms.distributedSystem,
a possibly empty set.public static SortedSet<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 String getDistributedSystemName()
public static void createGatewaySenderIds(String gatewaySenderConfig)
public static Set<String> getGatewaySenderIds(String gatewaySenderConfig)
(String) or createGatewaySenders(String), a possibly empty set.public static Set<String> getSerialGatewaySenderIds(String gatewaySenderConfig)
#createGatewaySenderIds(String)} or {@link #createGatewaySenders
(String)}, a possibly empty set.
#createGatewaySenders(String), a possibly empty list.public static Set<String> getParallelGatewaySenderIds(String gatewaySenderConfig)
createGatewaySenderIds(String) or createGatewaySenders(String),
a possibly empty set.protected static void saveGatewaySenderId(String gatewaySenderConfig, boolean parallel, String id)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.