123456789_123456789_123456789_123456789_123456789_

Class: Mongo::Cluster::Topology::ReplicaSetWithPrimary

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ReplicaSetNoPrimary, Base, Forwardable
Instance Chain:
Inherits: Mongo::Cluster::Topology::ReplicaSetNoPrimary
Defined in: lib/mongo/cluster/topology/replica_set_with_primary.rb

Overview

Defines behavior when a cluster is in replica set topology, and is a no primary which has been discovered by the driver.

Since:

  • 2.7.0

Constant Summary

::Mongo::Loggable - Included

PREFIX

ReplicaSetNoPrimary - Inherited

NAME

Class Method Summary

Base - Inherited

.new

Initialize the topology with the options.

Instance Attribute Summary

ReplicaSetNoPrimary - Inherited

#replica_set?

A replica set topology is a replica set.

#sharded?

A replica set topology is not sharded.

#single?

A replica set topology is not single.

#unknown?

A replica set topology is not unknown.

Base - Inherited

::Mongo::Monitoring::Publishable - Included

Instance Method Summary

ReplicaSetNoPrimary - Inherited

#display_name

Get the display name.

#has_readable_server?

Determine if the topology would select a readable server for the provided candidates and read preference.

#has_writable_server?

Determine if the topology would select a writable server for the provided candidates.

#servers

Select appropriate servers for this topology.

#summary, #validate_options

Base - Inherited

#addresses,
#max_election_id

The largest electionId ever reported by a primary.

#max_set_version

The largest setVersion ever reported by a primary.

#new_max_election_id, #new_max_set_version,
#replica_set_name

Get the replica set name configured for this topology.

#server_hosts_match_any?

Compares each server address against the list of patterns.

#validate_options

Validates and/or transforms options as necessary for the topology.

::Mongo::Monitoring::Publishable - Included

::Mongo::Loggable - Included

#log_debug

Convenience method to log debug messages with the standard prefix.

#log_error

Convenience method to log error messages with the standard prefix.

#log_fatal

Convenience method to log fatal messages with the standard prefix.

#log_info

Convenience method to log info messages with the standard prefix.

#log_warn

Convenience method to log warn messages with the standard prefix.

#logger

Get the logger instance.

#_mongo_log_prefix, #format_message