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
AWAIT_DATA_FLAG_BIT, DEFAULT_BATCH_SIZE, EXHAUST_FLAG_BIT, NO_CURSOR_TIMEOUT_FLAG_BIT, OPLOG_REPLAY_FLAG_BIT, PARTIAL_FLAG_BIT, REPLICA_OK_FLAG_BIT, TAILABLE_CURSOR_FLAG_BIT
HEADER_SIZE, myCollectionName, myDatabaseName
Constructor and Description |
---|
IsMaster()
Create a new IsMaster command.
|
equals, getBatchSize, getLimit, getNumberToReturn, getNumberToSkip, getQuery, getReturnFields, hashCode, isAwaitData, isBatchSizeSet, isExhaust, isLimitSet, isNoCursorTimeout, isPartial, isTailable, validateSize, write
getCollectionName, getDatabaseName, getReadPreference, init, writeHeader
public static final Document IS_MASTER
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.