Package com.mongodb.selector
Contains classes that determine how to select the server to connect to in order to send commands or queries.
-
Interface Summary Interface Description ServerSelector An interface for selecting a server from a cluster according to some preference. -
Class Summary Class Description CompositeServerSelector A server selector that composes a list of server selectors, and selects the servers by iterating through the list from start to finish, passing the result of the previous into the next, and finally returning the result of the last one.LatencyMinimizingServerSelector A server selector that accepts only servers within the given ping-time latency difference from the faster of the servers.PrimaryServerSelector Deprecated. Use eitherReadPreferenceServerSelector
orWritableServerSelector
, depending on your requirementsReadPreferenceServerSelector A server selector that chooses based on a read preference.ServerAddressSelector A server selector that chooses a server that matches the server address.WritableServerSelector A server selector that chooses servers that are writable.