| Class | Mongo::Cluster::Topology::Unknown |
| In: |
lib/mongo/cluster/topology/unknown.rb
|
| Parent: | Base |
Defines behavior for when a cluster is in an unknown state.
@since 2.0.0
| NAME | = | 'Unknown'.freeze |
The display name for the topology.
@since 2.0.0 |
Get the display name.
@example Get the display name.
Unknown.display_name
@return [ String ] The display name.
@since 2.0.0
Determine if the topology would select a readable server for the provided candidates and read preference.
@example Is a readable server present?
topology.has_readable_server?(cluster, server_selector)
@param [ Cluster ] cluster The cluster. @param [ ServerSelector ] server_selector The server
selector.
@return [ false ] An Unknown topology will never have a readable server.
@since 2.4.0
An unknown topology is not a replica set.
@example Is the topology a replica set?
Unknown.replica_set?
@return [ false ] Always false.
@since 2.0.0
An unknown topology is not sharded.
@example Is the topology sharded?
Unknown.sharded?
@return [ false ] Always false.
@since 2.0.0
An unknown topology is not single.
@example Is the topology single?
Unknown.single?
@return [ true ] Always false.
@since 2.0.0
An unknown topology is unknown.
@example Is the topology unknown?
Unknown.unknown?
@return [ true ] Always true.
@since 2.0.0