Package com.mongodb.binding
Class SingleConnectionReadBinding
java.lang.Object
com.mongodb.internal.binding.AbstractReferenceCounted
com.mongodb.binding.SingleConnectionReadBinding
- All Implemented Interfaces:
ReadBinding,ReferenceCounted
@Deprecated
public class SingleConnectionReadBinding
extends com.mongodb.internal.binding.AbstractReferenceCounted
implements ReadBinding
Deprecated.
A read binding that is bound to a single connection.
- Since:
- 3.2
-
Constructor Summary
ConstructorsConstructorDescriptionSingleConnectionReadBinding(ReadPreference readPreference, ServerDescription serverDescription, Connection connection) Deprecated.Construct an instance. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.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.voidrelease()Deprecated.Release a reference to this object.retain()Deprecated.Retain an additional reference to this object.Methods inherited from class com.mongodb.internal.binding.AbstractReferenceCounted
getCountMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mongodb.binding.ReferenceCounted
getCount
-
Constructor Details
-
SingleConnectionReadBinding
public SingleConnectionReadBinding(ReadPreference readPreference, ServerDescription serverDescription, Connection connection) Deprecated.Construct an instance.- Parameters:
readPreference- the read preference of this bindingserverDescription- the description of the serverconnection- the connection to bind to.
-
-
Method Details
-
getReadPreference
Deprecated.Description copied from interface:ReadBindingThe read preference that all connection sources returned by this instance will satisfy.- Specified by:
getReadPreferencein interfaceReadBinding- Returns:
- the non-null read preference
-
getReadConnectionSource
Deprecated.Description copied from interface:ReadBindingReturns a connection source to a server that satisfies the specified read preference.- Specified by:
getReadConnectionSourcein interfaceReadBinding- Returns:
- the connection source
-
getSessionContext
Deprecated.Description copied from interface:ReadBindingGets the session context for this binding.- Specified by:
getSessionContextin interfaceReadBinding- Returns:
- the session context, which may not be null
-
retain
Deprecated.Description copied from interface:ReferenceCountedRetain an additional reference to this object. All retained references must be released, or there will be a leak.- Specified by:
retainin interfaceReadBinding- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classcom.mongodb.internal.binding.AbstractReferenceCounted- Returns:
- this
-
release
public void release()Deprecated.Description copied from interface:ReferenceCountedRelease a reference to this object.- Specified by:
releasein interfaceReferenceCounted- Overrides:
releasein classcom.mongodb.internal.binding.AbstractReferenceCounted
-