public interface ClusterFactory
Cluster
implementations.Modifier and Type | Method and Description |
---|---|
Cluster |
create(ClusterSettings settings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
java.util.List<MongoCredential> credentialList,
ClusterListener clusterListener,
ConnectionPoolListener connectionPoolListener,
ConnectionListener connectionListener)
Creates a cluster with the given settings.
|
Cluster create(ClusterSettings settings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, java.util.List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener)
settings
- the cluster settingsserverSettings
- the server settingsconnectionPoolSettings
- the connection pool settingsstreamFactory
- the stream factoryheartbeatStreamFactory
- the heartbeat stream factorycredentialList
- the credential listclusterListener
- an optional listener for cluster-related eventsconnectionPoolListener
- an optional listener for connection pool-related eventsconnectionListener
- an optional listener for connection-related events