public final class DefaultClusterFactory extends java.lang.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,
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,
CommandListener commandListener)
|
Cluster |
create(ClusterSettings settings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
java.util.List<MongoCredential> credentialList,
ClusterListener clusterListener,
ConnectionPoolListener connectionPoolListener,
ConnectionListener connectionListener,
CommandListener commandListener,
java.lang.String applicationName,
MongoDriverInformation mongoDriverInformation)
|
Cluster |
createCluster(ClusterSettings clusterSettings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
java.util.List<MongoCredential> credentialList,
CommandListener commandListener,
java.lang.String applicationName,
MongoDriverInformation mongoDriverInformation)
|
Cluster |
createCluster(ClusterSettings clusterSettings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
java.util.List<MongoCredential> credentialList,
CommandListener commandListener,
java.lang.String applicationName,
MongoDriverInformation mongoDriverInformation,
java.util.List<MongoCompressor> compressorList)
Creates a cluster with the given settings.
|
public Cluster create(ClusterSettings settings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, java.util.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, java.util.List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener, CommandListener commandListener)
createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory,
List, CommandListener, String, MongoDriverInformation, List)
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, java.util.List<MongoCredential> credentialList, ClusterListener clusterListener, ConnectionPoolListener connectionPoolListener, ConnectionListener connectionListener, CommandListener commandListener, java.lang.String applicationName, MongoDriverInformation mongoDriverInformation)
createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory,
List, CommandListener, String, MongoDriverInformation, List)
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 cluster@Deprecated public Cluster createCluster(ClusterSettings clusterSettings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, java.util.List<MongoCredential> credentialList, CommandListener commandListener, java.lang.String applicationName, MongoDriverInformation mongoDriverInformation)
createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory,
List, CommandListener, String, MongoDriverInformation, List)
insteadclusterSettings
- 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 clusterpublic Cluster createCluster(ClusterSettings clusterSettings, ServerSettings serverSettings, ConnectionPoolSettings connectionPoolSettings, StreamFactory streamFactory, StreamFactory heartbeatStreamFactory, java.util.List<MongoCredential> credentialList, CommandListener commandListener, java.lang.String applicationName, MongoDriverInformation mongoDriverInformation, java.util.List<MongoCompressor> compressorList)
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 clustercompressorList
- the list of compressors to request, in priority order