HelloResult class

Class representing the output of the Hello command Not all values are represented. If you need something that here is missing use the execute method that returns the original Map document.

Note hello returns a document that describes the role of the mongod instance. If the optional field saslSupportedMechs is specified, the command also returns an array of SASL mechanisms used to create the specified user's credentials. If the instance is a member of a replica set, then hello returns a subset of the replica set configuration and status including whether or not the instance is the primary of the replica set. When sent to a mongod instance that is not a member of a replica set, hello returns a subset of this information. MongoDB drivers and clients use hello to determine the state of the replica set members and to discover additional members of a replica set.

Constructors

HelloResult(Map<String, dynamic> document)

Properties

arbiterOnly bool?
A boolean value that , when true, indicates that the current instance is an arbiter. The arbiterOnly field is only present, if the instance is an arbiter.
getter/setter pair
arbiters List<String>?
An array of strings in the format of "hostname:port" listing all members of the replica set that are arbiters. This field only appears if there is at least one arbiter in the replica set.
getter/setter pair
code int?
getter/setter pairinherited
codeName String?
getter/setter pairinherited
compression List<String>?
An array listing the compression algorithms used or available for use (i.e. common to both the client and the mongod or mongos instance) to compress the communication between the client and the mongod or mongos instance. The field is only available if compression is used. For example: If the mongod is enabled to use both the snappy,zlib compressors and a client has specified zlib, the compression field would contain: "compression": "zlib" If the mongod is enabled to use both the snappy,zlib compressors and a client has specified zlib,snappy, the compression field would contain: "compression": "zlib", "snappy" If the mongod is enabled to use the snappy compressor and a client has specified zlib,snappy, the compression field would contain : "compression": "snappy" If the mongod is enabled to use the snappy compressor and a client has s pecified zlib or the client has specified no compressor, the field is omitted. That is, if the client does not specify compression or if the client specifies a compressor not enabled for the connected mongod or mongos instance, the field does not return.
getter/setter pair
connectionId int?
An identifier for the mongod/mongos instance's outgoing connection to the client.
getter/setter pair
electionId ObjectId?
A unique identifier for each election. Included only in the output of hello for the primary. Used by clients to determine when elections occur.
getter/setter pair
errmsg String?
Optional error fields
getter/setter pairinherited
failure bool
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hidden bool?
A boolean value that, when true, indicates that the current instance is hidden. The hidden field is only present for hidden members.
getter/setter pair
hosts List<String>?
*** Replica Sets hello contains these fields when returned by a member of a replica set: An array of strings in the format of "hostname:port" that lists all members of the replica set that are neither hidden, passive, nor arbiters. Drivers use this array and the hello.passives to determine which members to read from.
getter/setter pair
isWritablePrimary bool
A boolean value that reports when this node is writable. If true, then this instance is a primary in a replica set, or a mongos instance, or a standalone mongod. This field will be false if the instance is a secondary member of a replica set or if the member is an arbiter of a replica set.
getter/setter pair
lastWrite Map?
A document containing optime and date information for the database's most recent write operation.
getter/setter pair
localTime DateTime
Returns the local server time in UTC.
getter/setter pair
logicalSessionTimeoutMinutes int
The time in minutes that a session remains active after its most recent use. Sessions that have not received a new read/write operation from the client or been refreshed with refreshSessions within this threshold are cleared from the cache. State associated with an expired session may be cleaned up by the server at any time.
getter/setter pair
maxBsonObjectSize int
The maximum permitted size of a BSON object in bytes for this mongod process. If not provided, clients should assume a max size of "16 * 1024 * 1024".
getter/setter pair
maxMessageSizeBytes int
The maximum permitted size of a BSON wire protocol message. The default value is 48000000 bytes.
getter/setter pair
maxWireVersion int
The latest version of the wire protocol that this mongod or mongos instance is capable of using to communicate with clients. Clients may use maxWireVersion to help negotiate compatibility with MongoDB.
getter/setter pair
maxWriteBatchSize int
The maximum number of write operations permitted in a write batch. If a batch exceeds this limit, the client driver divides the batch into smaller groups each with counts less than or equal to the value of this field. The value of this limit is 100,000 writes.
getter/setter pair
me String?
The hostname:port of the member that returned hello.
getter/setter pair
minWireVersion int
The earliest version of the wire protocol that this mongod or mongos instance is capable of using to communicate with clients. Clients may use minWireVersion to help negotiate compatibility with MongoDB.
getter/setter pair
msg String?
*** Sharded Instances mongos instances add the following field to the hello response document: Contains the value isdbgrid when hello returns from a mongos instance.
getter/setter pair
ok double
Command status (1.0 Ok, 0.0 error)
getter/setter pairinherited
passive bool?
A boolean value that, when true, indicates that the current instance is passive. The passive field is only present for members with a membersn.priority of 0.
getter/setter pair
passives List<String>?
An array of strings in the format of "hostname:port" listing all members of the replica set which have a membersn.priority of 0. This field only appears if there is at least one member with a membersn.priority of 0. Drivers use this array and the hello.hosts to determine which members to read from.
getter/setter pair
primary String?
A string in the format of "hostname:port" listing the current primary member of the replica set.
getter/setter pair
readOnly bool
A boolean value that, when true, indicates that the mongod or mongos is running in read-only mode.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saslSupportedMechs List<String>?
An array of SASL mechanisms used to create the user's credential or credentials. Supported SASL mechanisms are:
getter/setter pair
secondary bool?
A boolean value that, when true, indicates if the mongod is a secondary member of a replica set.
getter/setter pair
setName String?
The name of the current :replica set.
getter/setter pair
setVersion int?
The current replica set config version.
getter/setter pair
success bool
no setterinherited
tags Map<String, String>?
A tags document contains user-defined tag field and value pairs for the replica set member. { "<tag1>": "<string1>", "<tag2>": "<string2>",... } For read operations, you can specify a tag set in the read preference to direct the operations to replica set member(s) with the specified tag(s). For write operations, you can create a customize write concern using settings.getLastErrorModes and settings.getLastErrorDefaults. For more information, see Configure Replica Set Tag Sets (https://docs.mongodb.com/v5.0/tutorial/configure-replica-set-tag-sets/).
getter/setter pair
topologyVersion ↔ dynamic
For internal use by MongoDB.
getter/setter pair

Methods

extractBasic(Map<String, dynamic> document) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited