Class SingleServerBinding

java.lang.Object
com.mongodb.internal.binding.AbstractReferenceCounted
com.mongodb.binding.SingleServerBinding
All Implemented Interfaces:
ReadBinding, ReadWriteBinding, ReferenceCounted, WriteBinding

@Deprecated public class SingleServerBinding extends com.mongodb.internal.binding.AbstractReferenceCounted implements ReadWriteBinding
Deprecated.
A simple binding where all connection sources are bound to the server specified in the constructor.
Since:
3.0
  • Constructor Details

    • SingleServerBinding

      public SingleServerBinding(Cluster cluster, ServerAddress serverAddress)
      Deprecated.
      Creates an instance, defaulting to ReadPreference.primary() for reads.
      Parameters:
      cluster - a non-null Cluster which will be used to select a server to bind to
      serverAddress - a non-null address of the server to bind to
    • SingleServerBinding

      public SingleServerBinding(Cluster cluster, ServerAddress serverAddress, ReadPreference readPreference)
      Deprecated.
      Creates an instance.
      Parameters:
      cluster - a non-null Cluster which will be used to select a server to bind to
      serverAddress - a non-null address of the server to bind to
      readPreference - a non-null ReadPreference for read operations
  • Method Details