primary
Sets the address of the current primary in the replica set
- Parameters:
primary
- A string in the format of "[hostname]:[port]" listing the current primary member of the replica set.- Returns:
- this
address(ServerAddress address)
build()
canonicalAddress(String canonicalAddress)
electionId(ObjectId electionId)
helloOk(boolean helloOk)
lastUpdateTimeNanos(long lastUpdateTimeNanos)
lastWriteDate(Date lastWriteDate)
logicalSessionTimeoutMinutes(Integer logicalSessionTimeoutMinutes)
maxDocumentSize(int maxDocumentSize)
maxWireVersion(int maxWireVersion)
minWireVersion(int minWireVersion)
ok(boolean ok)
roundTripTime(long roundTripTime,
TimeUnit timeUnit)
setVersion(Integer setVersion)
state(ServerConnectionState state)
topologyVersion(TopologyVersion topologyVersion)
type(ServerType type)
address
- the address of the servercanonicalAddress
- the host name and port as a stringtype
- the Server typehosts
- A Set of strings in the format of "[hostname]:[port]" that contains all members of the replica set that are neither
hidden, passive, nor arbiters.passives
- A Set of strings in the format of "[hostname]:[port]" listing all members of the replica set which have a
priority of 0.arbiters
- A Set of strings in the format of "[hostname]:[port]" containing all members of the replica set that are
arbiters.primary
- A string in the format of "[hostname]:[port]" listing the current primary member of the replica set.maxDocumentSize
- the maximum size a document can betagSet
- a TagSet with all the tags for this server.roundTripTime
- the time takentimeUnit
- the units of the time takensetName
- the name of the replica setok
- true if the request executed correctlystate
- ServerConnectionState representing whether the server has been successfully connected tominWireVersion
- the minimum protocol version supported by this servermaxWireVersion
- the maximum protocol version supported by this serverelectionId
- the electionIdsetVersion
- the set versiontopologyVersion
- the topology versionlastWriteDate
- the last write date, which may be null for servers prior to 3.4System.nanoTime()
should be used to initialize this value.lastUpdateTimeNanos
- the last update time of this server descriptionlogicalSessionTimeoutMinutes
- the session timeout in minutes, or null if sessions are not supported by this serverfalse
.helloOk
- helloOkexception
- the exception