Interface ClusterFactory

    • Method Detail

      • 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 settings
        serverSettings - the server settings
        connectionPoolSettings - the connection pool settings
        streamFactory - the stream factory
        heartbeatStreamFactory - the heartbeat stream factory
        credentialList - the credential list
        clusterListener - an optional listener for cluster-related events
        connectionPoolListener - an optional listener for connection pool-related events
        connectionListener - an optional listener for connection-related events
        Returns:
        the cluster