svn: /phpdoc/en/trunk/reference/mongodb/mongodb/driver/ server.xml
| From: | Jeremy Mikola | Date: | Wed, 20 Apr 2016 20:57:06 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mongodb/mongodb/driver/ server.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-14111@lists.php.net to get a copy of this message | ||
jmikola Wed, 20 Apr 2016 20:57:06 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=339042
Log:
Document MongoDB\Driver\Server type constants
https://jira.mongodb.org/browse/PHPC-530
Changed paths:
U phpdoc/en/trunk/reference/mongodb/mongodb/driver/server.xml
Modified: phpdoc/en/trunk/reference/mongodb/mongodb/driver/server.xml
===================================================================
--- phpdoc/en/trunk/reference/mongodb/mongodb/driver/server.xml 2016-04-20 13:37:21 UTC (rev 339041)
+++ phpdoc/en/trunk/reference/mongodb/mongodb/driver/server.xml 2016-04-20 20:57:06 UTC (rev 339042)
@@ -36,34 +36,58 @@
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
- <varname
linkend="mongodb-driver-server.constants.type-mongos">MongoDB\Driver\Server::TYPE_MONGOS</varname>
+ <varname
linkend="mongodb-driver-server.constants.type-unknown">MongoDB\Driver\Server::TYPE_UNKNOWN</varname>
+ <initializer>0</initializer>
+ </fieldsynopsis>
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="mongodb-driver-server.constants.type-standalone">MongoDB\Driver\Server::TYPE_STANDALONE</varname>
<initializer>1</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
- <varname
linkend="mongodb-driver-server.constants.type-standalone">MongoDB\Driver\Server::TYPE_STANDALONE</varname>
+ <varname
linkend="mongodb-driver-server.constants.type-mongos">MongoDB\Driver\Server::TYPE_MONGOS</varname>
<initializer>2</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
- <varname
linkend="mongodb-driver-server.constants.type-arbiter">MongoDB\Driver\Server::TYPE_ARBITER</varname>
+ <varname
linkend="mongodb-driver-server.constants.type-possible-primary">MongoDB\Driver\Server::TYPE_POSSIBLE_PRIMARY</varname>
<initializer>3</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
- <varname
linkend="mongodb-driver-server.constants.type-secondary">MongoDB\Driver\Server::TYPE_SECONDARY</varname>
+ <varname
linkend="mongodb-driver-server.constants.type-rs-primary">MongoDB\Driver\Server::TYPE_RS_PRIMARY</varname>
<initializer>4</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>integer</type>
- <varname
linkend="mongodb-driver-server.constants.type-primary">MongoDB\Driver\Server::TYPE_PRIMARY</varname>
+ <varname
linkend="mongodb-driver-server.constants.type-rs-secondary">MongoDB\Driver\Server::TYPE_RS_SECONDARY</varname>
<initializer>5</initializer>
</fieldsynopsis>
-
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="mongodb-driver-server.constants.type-rs-arbiter">MongoDB\Driver\Server::TYPE_RS_ARBITER</varname>
+ <initializer>6</initializer>
+ </fieldsynopsis>
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="mongodb-driver-server.constants.type-rs-other">MongoDB\Driver\Server::TYPE_RS_OTHER</varname>
+ <initializer>7</initializer>
+ </fieldsynopsis>
+ <fieldsynopsis>
+ <modifier>const</modifier>
+ <type>integer</type>
+ <varname
linkend="mongodb-driver-server.constants.type-rs-ghost">MongoDB\Driver\Server::TYPE_RS_GHOST</varname>
+ <initializer>8</initializer>
+ </fieldsynopsis>
+
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.mongodb-driver-server')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"
/>
</classsynopsis>
@@ -76,41 +100,72 @@
&reftitle.constants;
<variablelist>
- <varlistentry xml:id="mongodb-driver-server.constants.type-mongos">
- <term><constant>MongoDB\Driver\Server::TYPE_MONGOS</constant></term>
+ <varlistentry xml:id="mongodb-driver-server.constants.type-unknown">
+ <term><constant>MongoDB\Driver\Server::TYPE_UNKNOWN</constant></term>
<listitem>
- <para></para>
+ <para>Unknown server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-driver-server.constants.type-standalone">
<term><constant>MongoDB\Driver\Server::TYPE_STANDALONE</constant></term>
<listitem>
- <para></para>
+ <para>Standalone server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
</listitem>
</varlistentry>
- <varlistentry xml:id="mongodb-driver-server.constants.type-arbiter">
- <term><constant>MongoDB\Driver\Server::TYPE_ARBITER</constant></term>
+ <varlistentry xml:id="mongodb-driver-server.constants.type-mongos">
+ <term><constant>MongoDB\Driver\Server::TYPE_MONGOS</constant></term>
<listitem>
- <para></para>
+ <para>Mongos server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
</listitem>
</varlistentry>
- <varlistentry xml:id="mongodb-driver-server.constants.type-secondary">
-
<term><constant>MongoDB\Driver\Server::TYPE_SECONDARY</constant></term>
+ <varlistentry xml:id="mongodb-driver-server.constants.type-possible-primary">
+
<term><constant>MongoDB\Driver\Server::TYPE_POSSIBLE_PRIMARY</constant></term>
<listitem>
- <para></para>
+ <para>Replica set possible primary server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
+ <para>A server may be identified as a possible primary if it has not yet been checked
but another memory of the replica set thinks it is the primary.</para>
</listitem>
</varlistentry>
- <varlistentry xml:id="mongodb-driver-server.constants.type-primary">
- <term><constant>MongoDB\Driver\Server::TYPE_PRIMARY</constant></term>
+ <varlistentry xml:id="mongodb-driver-server.constants.type-rs-primary">
+
<term><constant>MongoDB\Driver\Server::TYPE_RS_PRIMARY</constant></term>
<listitem>
- <para></para>
+ <para>Replica set primary server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
</listitem>
</varlistentry>
+ <varlistentry xml:id="mongodb-driver-server.constants.type-rs-secondary">
+
<term><constant>MongoDB\Driver\Server::TYPE_RS_SECONDARY</constant></term>
+ <listitem>
+ <para>Replica set secondary server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="mongodb-driver-server.constants.type-rs-arbiter">
+
<term><constant>MongoDB\Driver\Server::TYPE_RS_ARBITER</constant></term>
+ <listitem>
+ <para>Replica set arbiter server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="mongodb-driver-server.constants.type-rs-other">
+ <term><constant>MongoDB\Driver\Server::TYPE_RS_OTHER</constant></term>
+ <listitem>
+ <para>Replica set other server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
+ <para>Such servers may be hidden, starting up, or recovering. They cannot be queried,
but their hosts lists are useful for discovering the current replica set configuration.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry xml:id="mongodb-driver-server.constants.type-rs-ghost">
+ <term><constant>MongoDB\Driver\Server::TYPE_RS_GHOST</constant></term>
+ <listitem>
+ <para>Replica set ghost server type, returned by
<methodname>MongoDB\Driver\Server::getType</methodname>.</para>
+ <para>Servers may be identified as such in at least three situations: briefly during
server startup; in an uninitialized replica set; or when the server is shunned (i.e. removed from
the replica set config). They cannot be queried, nor can their host list be used to discover the
current replica set configuration; however, the client may monitor this server in hope that it
transitions to a more useful state.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</section>
<!-- }}} -->