文字

The MongoDB\Driver\Server class

(mongodb >=1.0.0)

简介

类摘要

final MongoDB\Driver\Server {
const integer TYPE_MONGOS = 1 ;
const integer TYPE_STANDALONE = 2 ;
const integer TYPE_ARBITER = 3 ;
const integer TYPE_SECONDARY = 4 ;
const integer TYPE_PRIMARY = 5 ;
final private __construct ( void )
final public MongoDB\Driver\WriteResult executeBulkWrite ( string $namespace , MongoDB\Driver\BulkWrite $bulk [, MongoDB\Driver\WriteConcern $writeConcern ] )
final public MongoDB\Driver\Cursor executeCommand ( string $db , MongoDB\Driver\Command $command [, MongoDB\Driver\ReadPreference $readPreference ] )
final public MongoDB\Driver\Cursor MongoDB\Driver\Manager::executeQuery ( string $namespace , MongoDB\Driver\Query $query [, MongoDB\Driver\ReadPreference $readPreference ] )
final public string getHost ( void )
final public array getInfo ( void )
final public string getLatency ( void )
final public int getPort ( void )
final public array getTags ( void )
final public int getType ( void )
final public bool isArbiter ( void )
final public bool isHidden ( void )
final public bool isPassive ( void )
final public bool isPrimary ( void )
final public bool isSecondary ( void )
}

预定义常量

MongoDB\Driver\Server::TYPE_MONGOS

MongoDB\Driver\Server::TYPE_STANDALONE

MongoDB\Driver\Server::TYPE_ARBITER

MongoDB\Driver\Server::TYPE_SECONDARY

MongoDB\Driver\Server::TYPE_PRIMARY

Table of Contents

  • MongoDB\Driver\Server::__construct — Create a new Server (not used)
  • MongoDB\Driver\Server::executeBulkWrite — Execute one or more write operations on this server
  • MongoDB\Driver\Server::executeCommand — Execute a database command on this server
  • MongoDB\Driver\Server::executeQuery — Execute a database query on this server
  • MongoDB\Driver\Server::getHost — Returns the hostname of this server
  • MongoDB\Driver\Server::getInfo — Returns an array of information about this server
  • MongoDB\Driver\Server::getLatency — Returns the latency of this server
  • MongoDB\Driver\Server::getPort — Returns the port on which this server is listening
  • MongoDB\Driver\Server::getTags — Returns an array of tags describing this server in a replica set
  • MongoDB\Driver\Server::getType — Returns an integer denoting the type of this server
  • MongoDB\Driver\Server::isArbiter — Checks if this server is an arbiter member of a replica set
  • MongoDB\Driver\Server::isHidden — Checks if this server is a hidden member of a replica set
  • MongoDB\Driver\Server::isPassive — Checks if this server is a passive member of a replica set
  • MongoDB\Driver\Server::isPrimary — Checks if this server is a primary member of a replica set
  • MongoDB\Driver\Server::isSecondary — Checks if this server is a secondary member of a replica set
上一篇: 下一篇: