public final class DefaultClusterFactory extends Object implements ClusterFactory
Constructor and Description |
---|
DefaultClusterFactory() |
Modifier and Type | Method and Description |
---|---|
Cluster |
create(ClusterSettings settings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
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,
List<MongoCredential> credentialList,
ClusterListener clusterListener,
ConnectionPoolListener connectionPoolListener,
ConnectionListener connectionListener,
CommandListener commandListener)
|
Cluster |
create(ClusterSettings settings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
List<MongoCredential> credentialList,
ClusterListener clusterListener,
ConnectionPoolListener connectionPoolListener,
ConnectionListener connectionListener,
CommandListener commandListener,
String applicationName,
MongoDriverInformation mongoDriverInformation)
|
Cluster |
createCluster(ClusterSettings clusterSettings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
List<MongoCredential> credentialList,
CommandListener commandListener,
String applicationName,
MongoDriverInformation mongoDriverInformation)
Creates a cluster with the given settings.
|
public Cluster create(ClusterSettings settings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener)
ClusterFactory
create
in interface ClusterFactory
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@Deprecated public Cluster create(ClusterSettings settings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener, CommandListener commandListener)
createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory,
List, CommandListener, String, MongoDriverInformation)
insteadsettings
- 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 eventscommandListener
- an optional listener for command-related events@Deprecated public Cluster create(ClusterSettings settings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener, CommandListener commandListener, String applicationName, MongoDriverInformation mongoDriverInformation)
createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory,
List, CommandListener, String, MongoDriverInformation)
insteadsettings
- 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 eventscommandListener
- an optional listener for command-related eventsapplicationName
- an optional application name to associate with connections to the servers in this clustermongoDriverInformation
- the optional driver information associate with connections to the servers in this clusterpublic Cluster createCluster(ClusterSettings clusterSettings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, List<MongoCredential> credentialList, CommandListener commandListener, String applicationName, MongoDriverInformation mongoDriverInformation)
clusterSettings
- the cluster settingsserverSettings
- the server settingsconnectionPoolSettings
- the connection pool settingsstreamFactory
- the stream factoryheartbeatStreamFactory
- the heartbeat stream factorycredentialList
- the credential listcommandListener
- an optional listener for command-related eventsapplicationName
- an optional application name to associate with connections to the servers in this clustermongoDriverInformation
- the optional driver information associate with connections to the servers in this cluster