Enclosing class:
ServerDescription
Deprecated.
A builder for creating ServerDescription.
Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods
Deprecated.
Sets the address of the server.
Deprecated.
Sets the arbiters in the replica set
Deprecated.
Create a new ServerDescription from the settings in this builder.
Deprecated.
Sets the canonical host name and port of this server.
Deprecated.
Sets the electionId reported by this server.
Deprecated.
Sets the exception thrown while attempting to determine the server description.
Deprecated.
Sets all members of the replica set that are neither hidden, passive, nor arbiters.
Deprecated.
Sets the last update time for this description, which is simply the time that the server description was created.
Deprecated.
Sets the lastWriteDate reported by this server
Deprecated.
Sets the session timeout in minutes.
Deprecated.
The maximum permitted size of a BSON object in bytes for this mongod process.
Deprecated.
The latest version of the wire protocol that this MongoDB server is capable of using to communicate with clients.
Deprecated.
The earliest version of the wire protocol that this MongoDB server is capable of using to communicate with clients.
Deprecated.
The isOK() result from requesting this information from MongoDB
Deprecated.
Sets the passive members of the replica set.
Deprecated.
Sets the address of the current primary in the replica set
Deprecated.
Set the time it took to make the round trip for requesting this information from the server
Deprecated.
Sets the name of the replica set
Deprecated.
Sets the setVersion reported by this server.
Deprecated.
The current state of the connection to the server.
Deprecated.
A set of any tags assigned to this member.
Deprecated.
Sets the type of the server, for example whether it's a standalone or in a replica set.
Constructor Details
Builder
public Builder ()
Deprecated.
Method Details
address
Deprecated.
Sets the address of the server.
Parameters:
address
- the address of the server
Returns:
this
canonicalAddress
Deprecated.
Sets the canonical host name and port of this server. This is typically derived from the "me" field contained in the "isMaster"
command. response.
Parameters:
canonicalAddress
- the host name and port as a string
Returns:
this
type
Deprecated.
Sets the type of the server, for example whether it's a standalone or in a replica set.
Parameters:
type
- the Server type
Returns:
this
hosts
Deprecated.
Sets all members of the replica set that are neither hidden, passive, nor arbiters.
Parameters:
hosts
- 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.
Returns:
this
passives
Deprecated.
Sets the passive members of the replica set.
Parameters:
passives
- A Set of strings in the format of "[hostname]:[port]" listing all members of the replica set which have a
priority of 0.
Returns:
this
arbiters
Deprecated.
Sets the arbiters in the replica set
Parameters:
arbiters
- A Set of strings in the format of "[hostname]:[port]" containing all members of the replica set that are
arbiters.
Returns:
this
primary
Deprecated.
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
maxDocumentSize
Deprecated.
The maximum permitted size of a BSON object in bytes for this mongod process. Defaults to 16MB.
Parameters:
maxDocumentSize
- the maximum size a document can be
Returns:
this
roundTripTime
Deprecated.
Set the time it took to make the round trip for requesting this information from the server
Parameters:
roundTripTime
- the time taken
timeUnit
- the units of the time taken
Returns:
this
setName
Deprecated.
Sets the name of the replica set
Parameters:
setName
- the name of the replica set
Returns:
this
ok
Deprecated.
The isOK() result from requesting this information from MongoDB
Parameters:
ok
- true if the request executed correctly
Returns:
this
state
Deprecated.
The current state of the connection to the server.
Parameters:
state
- ServerConnectionState representing whether the server has been successfully connected to
Returns:
this
version
Deprecated.
Sets the server version
Parameters:
version
- a ServerVersion representing which version of MongoDB is running on this server
Returns:
this
minWireVersion
Deprecated.
The earliest version of the wire protocol that this MongoDB server is capable of using to communicate with clients.
Parameters:
minWireVersion
- the minimum protocol version supported by this server
Returns:
this
maxWireVersion
Deprecated.
The latest version of the wire protocol that this MongoDB server is capable of using to communicate with clients.
Parameters:
maxWireVersion
- the maximum protocol version supported by this server
Returns:
this
electionId
Deprecated.
Sets the electionId reported by this server.
Parameters:
electionId
- the electionId
Returns:
this
setVersion
Deprecated.
Sets the setVersion reported by this server.
Parameters:
setVersion
- the set version
Returns:
this
lastWriteDate
Deprecated.
Sets the lastWriteDate reported by this server
Parameters:
lastWriteDate
- the last write date, which may be null for servers prior to 3.4
Returns:
this
Since:
3.4
lastUpdateTimeNanos
Deprecated.
Sets the last update time for this description, which is simply the time that the server description was created.
A monotonic clock such as
System.nanoTime()
should be used to initialize this value.
Parameters:
lastUpdateTimeNanos
- the last update time of this server description
Returns:
this
Since:
3.4
logicalSessionTimeoutMinutes
Deprecated.
Sets the session timeout in minutes.
Parameters:
logicalSessionTimeoutMinutes
- the session timeout in minutes, or null if sessions are not supported by this server
Returns:
this
Since:
3.6
exception
Deprecated.
Sets the exception thrown while attempting to determine the server description.
Parameters:
exception
- the exception
Returns:
this
build
Deprecated.
Create a new ServerDescription from the settings in this builder.
Returns:
a new server description