Class AsyncSingleConnectionReadBinding

java.lang.Object
com.mongodb.internal.binding.AbstractReferenceCounted
com.mongodb.binding.AsyncSingleConnectionReadBinding
All Implemented Interfaces:
AsyncReadBinding, ReferenceCounted

@Deprecated public class AsyncSingleConnectionReadBinding extends com.mongodb.internal.binding.AbstractReferenceCounted implements AsyncReadBinding
Deprecated.
An asynchronous read binding that is bound to a single connection.
Since:
3.2
  • Constructor Details

    • AsyncSingleConnectionReadBinding

      public AsyncSingleConnectionReadBinding(ReadPreference readPreference, ServerDescription serverDescription, AsyncConnection connection)
      Deprecated.
      Construct an instance.
      Parameters:
      readPreference - the read preferenced of this binding
      serverDescription - the description of the server
      connection - the connection to bind to.
  • Method Details

    • getReadPreference

      public ReadPreference getReadPreference()
      Deprecated.
      Description copied from interface: AsyncReadBinding
      The read preference that all connection sources returned by this instance will satisfy.
      Specified by:
      getReadPreference in interface AsyncReadBinding
      Returns:
      the non-null read preference
    • getSessionContext

      public SessionContext getSessionContext()
      Deprecated.
      Description copied from interface: AsyncReadBinding
      Gets the session context for this binding.
      Specified by:
      getSessionContext in interface AsyncReadBinding
      Returns:
      the session context, which may not be null
    • getReadConnectionSource

      public void getReadConnectionSource(SingleResultCallback<AsyncConnectionSource> callback)
      Deprecated.
      Description copied from interface: AsyncReadBinding
      Returns a connection source to a server that satisfies the specified read preference.
      Specified by:
      getReadConnectionSource in interface AsyncReadBinding
      Parameters:
      callback - the to be passed the connection source
    • retain

      public AsyncReadBinding 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 interface AsyncReadBinding
      Specified by:
      retain in interface ReferenceCounted
      Overrides:
      retain in class com.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 interface ReferenceCounted
      Overrides:
      release in class com.mongodb.internal.binding.AbstractReferenceCounted