Package com.mongodb.binding
Interface ReadBinding
-
- All Superinterfaces:
ReferenceCounted
- All Known Subinterfaces:
ReadWriteBinding
- All Known Implementing Classes:
ClusterBinding,SingleConnectionReadBinding,SingleServerBinding
Deprecated.
@Deprecated public interface ReadBinding extends ReferenceCounted
A factory of connection sources to servers that can be read from and that satisfy the specified read preference.- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ConnectionSourcegetReadConnectionSource()Deprecated.Returns a connection source to a server that satisfies the specified read preference.ReadPreferencegetReadPreference()Deprecated.The read preference that all connection sources returned by this instance will satisfy.SessionContextgetSessionContext()Deprecated.Gets the session context for this binding.ReadBindingretain()Deprecated.Retain an additional reference to this object.-
Methods inherited from interface com.mongodb.binding.ReferenceCounted
getCount, release
-
-
-
-
Method Detail
-
getReadPreference
ReadPreference getReadPreference()
Deprecated.The read preference that all connection sources returned by this instance will satisfy.- Returns:
- the non-null read preference
-
getReadConnectionSource
ConnectionSource getReadConnectionSource()
Deprecated.Returns a connection source to a server that satisfies the specified read preference.- Returns:
- the connection source
-
getSessionContext
SessionContext getSessionContext()
Deprecated.Gets the session context for this binding.- Returns:
- the session context, which may not be null
- Since:
- 3.6
-
retain
ReadBinding 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 interfaceReferenceCounted- Returns:
- this
-
-