public interface ReconnectStrategy
Modifier and Type | Method and Description |
---|---|
Connection |
reconnect(Connection oldConnection)
Encapsulates the strategy for re-establishing the connection to the
server.
|
void |
setConfig(MongoClientConfiguration config)
Sets the configuration to be used by the reconnection strategy.
|
void |
setConnectionFactory(ProxiedConnectionFactory connectionFactory)
Sets the connection factory to use to establish connections to the
server.
|
void |
setSelector(ServerSelector selector)
Sets the selector to be used by the reconnection strategy.
|
void |
setState(Cluster state)
Sets the state of the cluster to be used by the reconnection strategy.
|
void setConfig(MongoClientConfiguration config)
config
- The configuration for the connections.void setConnectionFactory(ProxiedConnectionFactory connectionFactory)
connectionFactory
- The connection factory to use to establish connections to the
server.void setSelector(ServerSelector selector)
selector
- The selector for connections.void setState(Cluster state)
state
- The state of the cluster.Connection reconnect(Connection oldConnection)
oldConnection
- The connection that has become disconnected.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.