Package com.mongodb.binding
Class AsyncClusterBinding
java.lang.Object
com.mongodb.internal.binding.AbstractReferenceCounted
com.mongodb.binding.AsyncClusterBinding
- All Implemented Interfaces:
AsyncReadBinding
,AsyncReadWriteBinding
,AsyncWriteBinding
,ReferenceCounted
,com.mongodb.internal.binding.AsyncClusterAwareReadWriteBinding
@Deprecated
public class AsyncClusterBinding
extends com.mongodb.internal.binding.AbstractReferenceCounted
implements com.mongodb.internal.binding.AsyncClusterAwareReadWriteBinding
Deprecated.
A simple ReadWriteBinding implementation that supplies write connection sources bound to a possibly different primary each time, and a
read connection source bound to a possible different server each time.
- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncClusterBinding
(Cluster cluster, ReadPreference readPreference) Deprecated.AsyncClusterBinding
(Cluster cluster, ReadPreference readPreference, ReadConcern readConcern) Deprecated.Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.void
getConnectionSource
(ServerAddress serverAddress, SingleResultCallback<AsyncConnectionSource> callback) Deprecated.void
Deprecated.Returns a connection source to a server that satisfies the specified read preference.Deprecated.The read preference that all connection sources returned by this instance will satisfy.Deprecated.Gets the session context for this binding.void
Deprecated.Supply a connection source to a server that can be written toretain()
Deprecated.Retain an additional reference to this object.Methods inherited from class com.mongodb.internal.binding.AbstractReferenceCounted
getCount, release
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mongodb.binding.ReferenceCounted
getCount, release
-
Constructor Details
-
AsyncClusterBinding
Deprecated.Creates an instance.- Parameters:
cluster
- a non-null Cluster which will be used to select a server to bind toreadPreference
- a non-null ReadPreference for read operations
-
AsyncClusterBinding
Deprecated.Creates an instance.- Parameters:
cluster
- a non-null Cluster which will be used to select a server to bind toreadPreference
- a non-null ReadPreference for read operationsreadConcern
- a non-null read concern- Since:
- 3.8
-
-
Method Details
-
retain
Deprecated.Description copied from interface:ReferenceCounted
Retain an additional reference to this object. All retained references must be released, or there will be a leak.- Specified by:
retain
in interfaceAsyncReadBinding
- Specified by:
retain
in interfaceAsyncReadWriteBinding
- Specified by:
retain
in interfaceAsyncWriteBinding
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classcom.mongodb.internal.binding.AbstractReferenceCounted
- Returns:
- this
-
getCluster
Deprecated.- Specified by:
getCluster
in interfacecom.mongodb.internal.binding.AsyncClusterAwareReadWriteBinding
-
getReadPreference
Deprecated.Description copied from interface:AsyncReadBinding
The read preference that all connection sources returned by this instance will satisfy.- Specified by:
getReadPreference
in interfaceAsyncReadBinding
- Returns:
- the non-null read preference
-
getSessionContext
Deprecated.Description copied from interface:AsyncReadBinding
Gets the session context for this binding.- Specified by:
getSessionContext
in interfaceAsyncReadBinding
- Specified by:
getSessionContext
in interfaceAsyncWriteBinding
- Returns:
- the session context, which may not be null
-
getReadConnectionSource
Deprecated.Description copied from interface:AsyncReadBinding
Returns a connection source to a server that satisfies the specified read preference.- Specified by:
getReadConnectionSource
in interfaceAsyncReadBinding
- Parameters:
callback
- the to be passed the connection source
-
getWriteConnectionSource
Deprecated.Description copied from interface:AsyncWriteBinding
Supply a connection source to a server that can be written to- Specified by:
getWriteConnectionSource
in interfaceAsyncWriteBinding
- Parameters:
callback
- the to be passed the connection source
-
getConnectionSource
public void getConnectionSource(ServerAddress serverAddress, SingleResultCallback<AsyncConnectionSource> callback) Deprecated.- Specified by:
getConnectionSource
in interfacecom.mongodb.internal.binding.AsyncClusterAwareReadWriteBinding
-
AsyncClusterBinding(Cluster, ReadPreference, ReadConcern)