public class WanConnectionManager extends Object
WanReplicationPublisher.| Constructor and Description |
|---|
WanConnectionManager(com.hazelcast.instance.Node node,
com.hazelcast.spi.discovery.integration.DiscoveryService discoveryService) |
| Modifier and Type | Method and Description |
|---|---|
WanConnectionWrapper |
getConnection(com.hazelcast.nio.Address target)
Returns either the connection wrapper for the requested
target
or for the first target in the endpoint list if the provided
target is not in the endpoint list. |
List<com.hazelcast.nio.Address> |
getTargetEndpoints()
Return a snapshot of the list of currently known target endpoints to
which replication is made.
|
void |
init(String groupName,
WanConfigurationContext configurationContext)
Initialise the connection manager.
|
boolean |
isConnected()
Tests if connected to a configured target cluster endpoint
over WAN.
|
void |
removeTargetEndpoint(com.hazelcast.nio.Address targetAddress,
String reason,
Throwable cause) |
public WanConnectionManager(com.hazelcast.instance.Node node,
com.hazelcast.spi.discovery.integration.DiscoveryService discoveryService)
public void init(String groupName, WanConfigurationContext configurationContext)
DiscoveryService and schedule a task to rerun discovery.groupName - the group name for the discovered endpointsconfigurationContext - the configuration context for the WAN publisherpublic WanConnectionWrapper getConnection(com.hazelcast.nio.Address target)
target
or for the first target in the endpoint list if the provided
target is not in the endpoint list. The method may return null if
this method fails to create a connection, either because it cannot
connect in the expected time or it has failed to authorize.
The method will check if the connection is alive before returning the
wrapper.target - the address for which a connection is requestedpublic boolean isConnected()
true if there is at least one alive connection, false otherwisepublic void removeTargetEndpoint(com.hazelcast.nio.Address targetAddress,
String reason,
Throwable cause)
public List<com.hazelcast.nio.Address> getTargetEndpoints()
removeTargetEndpoint(Address, String, Throwable)Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.