Since: 1.13.0

final class ServerDescription (View source)

Constants

TYPE_UNKNOWN

TYPE_STANDALONE

TYPE_MONGOS

TYPE_POSSIBLE_PRIMARY

TYPE_RS_PRIMARY

TYPE_RS_SECONDARY

TYPE_RS_ARBITER

TYPE_RS_OTHER

TYPE_RS_GHOST

TYPE_LOAD_BALANCER

Methods

array
getHelloResponse()

Returns the server's most recent "hello" response

string
getHost()

Returns the hostname of this server

int
getLastUpdateTime()

Returns the server's last update time in microseconds

int
getPort()

Returns the port on which this server is listening

int|null
getRoundTripTime()

Returns the server's round trip time in milliseconds

string
getType()

Returns a string denoting the type of this server

void
__wakeup()

No description

Details

final array getHelloResponse()

Returns the server's most recent "hello" response

Return Value

array

final string getHost()

Returns the hostname of this server

Return Value

string

final int getLastUpdateTime()

Returns the server's last update time in microseconds

Return Value

int

final int getPort()

Returns the port on which this server is listening

Return Value

int

final int|null getRoundTripTime()

Returns the server's round trip time in milliseconds

Return Value

int|null

final string getType()

Returns a string denoting the type of this server

Return Value

string

final void __wakeup()

No description

Return Value

void