public class DefaultFailoverManager extends Object implements FailoverManager
Constructor and Description |
---|
DefaultFailoverManager(KaaChannelManager channelManager,
ExecutorContext context) |
DefaultFailoverManager(KaaChannelManager channelManager,
ExecutorContext context,
long failureResolutionTimeout,
long bootstrapServersRetryPeriod,
long operationsServersRetryPeriod,
long noConnectivityRetryPeriod,
TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
FailoverDecision |
onFailover(FailoverStatus failoverStatus)
Needs to be invoked to determine a decision that resolves the failover.
|
void |
onServerChanged(TransportConnectionInfo connectionInfo)
Needs to be invoked as soon as current server is changed.
|
void |
onServerConnected(TransportConnectionInfo connectionInfo)
Needs to be invoked as soon as connection to the current server is established.
|
void |
onServerFailed(TransportConnectionInfo connectionInfo)
Needs to be invoked when a server fail occurs.
|
public DefaultFailoverManager(KaaChannelManager channelManager, ExecutorContext context)
public DefaultFailoverManager(KaaChannelManager channelManager, ExecutorContext context, long failureResolutionTimeout, long bootstrapServersRetryPeriod, long operationsServersRetryPeriod, long noConnectivityRetryPeriod, TimeUnit timeUnit)
public void onServerFailed(TransportConnectionInfo connectionInfo)
FailoverManager
onServerFailed
in interface FailoverManager
connectionInfo
- the connection information of the failed server.TransportConnectionInfo
public void onServerChanged(TransportConnectionInfo connectionInfo)
FailoverManager
onServerChanged
in interface FailoverManager
connectionInfo
- the connection information of the newly connected server.TransportConnectionInfo
public void onServerConnected(TransportConnectionInfo connectionInfo)
FailoverManager
onServerConnected
in interface FailoverManager
connectionInfo
- the connection information of the current server,
to which connection was successfully established.TransportConnectionInfo
public FailoverDecision onFailover(FailoverStatus failoverStatus)
FailoverManager
onFailover
in interface FailoverManager
failoverStatus
- current status of the failover.FailoverDecision
,
FailoverStatus
Copyright © 2015. All rights reserved.