Package com.mongodb.internal.connection
Class SingleServerCluster
java.lang.Object
com.mongodb.internal.connection.SingleServerCluster
- All Implemented Interfaces:
Cluster,Closeable,AutoCloseable
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
This class needs to be final because we are leaking a reference to "this" from the constructor
-
Constructor Summary
ConstructorsConstructorDescriptionSingleServerCluster(ClusterId clusterId, ClusterSettings settings, ClusterableServerFactory serverFactory) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Closes connections to the servers in the cluster.Deprecated.Get the last seen cluster timeDeprecated.Get the current description of this cluster.Deprecated.Get the description of this cluster.Deprecated.Deprecated.Gets the cluster settings with which this cluster was created.booleanisClosed()Deprecated.Whether all the servers in the cluster are closed or not.selectServer(ServerSelector serverSelector) Deprecated.Get a MongoDB server that matches the criteria defined by the serverSelectorvoidselectServerAsync(ServerSelector serverSelector, SingleResultCallback<Server> callback) Deprecated.Asynchronously gets a MongoDB server that matches the criteria defined by the serverSelector.
-
Constructor Details
-
SingleServerCluster
public SingleServerCluster(ClusterId clusterId, ClusterSettings settings, ClusterableServerFactory serverFactory) Deprecated.
-
-
Method Details
-
close
public void close()Deprecated.Description copied from interface:ClusterCloses connections to the servers in the cluster. After this is called, this cluster instance can no longer be used. -
getClusterTime
Deprecated.Description copied from interface:ClusterGet the last seen cluster time- Specified by:
getClusterTimein interfaceCluster- Returns:
- the last seen cluster time or null if not set
-
selectServer
Deprecated.Description copied from interface:ClusterGet a MongoDB server that matches the criteria defined by the serverSelector- Specified by:
selectServerin interfaceCluster- Parameters:
serverSelector- a ServerSelector that defines how to select the required Server- Returns:
- a Server that meets the requirements
-
selectServerAsync
Deprecated.Description copied from interface:ClusterAsynchronously gets a MongoDB server that matches the criteria defined by the serverSelector.- Specified by:
selectServerAsyncin interfaceCluster- Parameters:
serverSelector- a ServerSelector that defines how to select the required Servercallback- the callback to invoke when the server is found or an error occurs
-
getDescription
Deprecated.Description copied from interface:ClusterGet the description of this cluster. This method will not return normally until the cluster type is known.- Specified by:
getDescriptionin interfaceCluster- Returns:
- a ClusterDescription representing the current state of the cluster
-
getSettings
Deprecated.Description copied from interface:ClusterGets the cluster settings with which this cluster was created.- Specified by:
getSettingsin interfaceCluster- Returns:
- the cluster settings
-
getServerFactory
Deprecated. -
isClosed
public boolean isClosed()Deprecated.Description copied from interface:ClusterWhether all the servers in the cluster are closed or not. -
getCurrentDescription
Deprecated.Description copied from interface:ClusterGet the current description of this cluster.- Specified by:
getCurrentDescriptionin interfaceCluster- Returns:
- the current ClusterDescription representing the current state of the cluster.
-