Package com.mongodb.connection
Interface ClusterFactory
- All Known Implementing Classes:
DefaultClusterFactory
Deprecated.
Factory for
Cluster implementations.- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptioncreate(ClusterSettings settings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener) Deprecated.Creates a cluster with the given settings.
-
Method Details
-
create
Cluster create(ClusterSettings settings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener) Deprecated.Creates a cluster with the given settings. The cluster mode will be based on the mode from the settings.- Parameters:
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- Returns:
- the cluster
-