public class IsMaster extends AdminCommand
This is a helper class for retrieving the status of replica sets. The results of this command will look like:
{ "ismaster" : false, "secondary" : true, "hosts" : [ "ny1.acme.com", "ny2.acme.com", "sf1.acme.com" ], "passives" : [ "ny3.acme.com", "sf3.acme.com" ], "arbiters" : [ "sf2.acme.com", ] "primary" : "ny2.acme.com", "ok" : true }
Modifier and Type | Field and Description |
---|---|
static Document |
IS_MASTER
The ismaster "query" document.
|
ADMIN_DATABASE
COMMAND_COLLECTION
HEADER_SIZE, myCollectionName, myDatabaseName
Constructor and Description |
---|
IsMaster()
Create a new IsMaster command.
|
equals, getCommand, getOperationName, getRoutingDocument, hashCode, isAllowJumbo, setAllowJumbo, size, toString, validateSize, write, write
finishHeader, getCollectionName, getDatabaseName, getReadPreference, getRequiredVersionRange, init, writeHeader, writeHeader
public static final Document IS_MASTER
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.