Class 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 Detail

      • 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 Detail

      • 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
      • 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