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
Constructors Constructor Description SingleConnectionReadBinding(ReadPreference readPreference, ServerDescription serverDescription, Connection connection)
Deprecated.Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ConnectionSource
getReadConnectionSource()
Deprecated.Returns a connection source to a server that satisfies the specified read preference.ReadPreference
getReadPreference()
Deprecated.The read preference that all connection sources returned by this instance will satisfy.SessionContext
getSessionContext()
Deprecated.Gets the session context for this binding.void
release()
Deprecated.Release a reference to this object.ReadBinding
retain()
Deprecated.Retain an additional reference to this object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.mongodb.binding.ReferenceCounted
getCount
-
-
-
-
Constructor Detail
-
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 Detail
-
getReadPreference
public ReadPreference getReadPreference()
Deprecated.Description copied from interface:ReadBinding
The read preference that all connection sources returned by this instance will satisfy.- Specified by:
getReadPreference
in interfaceReadBinding
- Returns:
- the non-null read preference
-
getReadConnectionSource
public ConnectionSource getReadConnectionSource()
Deprecated.Description copied from interface:ReadBinding
Returns a connection source to a server that satisfies the specified read preference.- Specified by:
getReadConnectionSource
in interfaceReadBinding
- Returns:
- the connection source
-
getSessionContext
public SessionContext getSessionContext()
Deprecated.Description copied from interface:ReadBinding
Gets the session context for this binding.- Specified by:
getSessionContext
in interfaceReadBinding
- Returns:
- the session context, which may not be null
-
retain
public ReadBinding 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 interfaceReadBinding
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classcom.mongodb.internal.binding.AbstractReferenceCounted
- Returns:
- this
-
release
public void release()
Deprecated.Description copied from interface:ReferenceCounted
Release a reference to this object.- Specified by:
release
in interfaceReferenceCounted
- Overrides:
release
in classcom.mongodb.internal.binding.AbstractReferenceCounted
-
-