<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<phpdoc:classref xml:id="class.mongodb-driver-serverdescription" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

 <title>The MongoDB\Driver\ServerDescription class</title>
 <titleabbrev>MongoDB\Driver\ServerDescription</titleabbrev>

 <partintro>

<!-- {{{ MongoDB\Driver\ServerDescription intro -->
  <section xml:id="mongodb-driver-serverdescription.intro">
   &reftitle.intro;
   <para>
    The <classname>MongoDB\Driver\ServerDescription</classname> class is a value
    object that represents a server to which the driver is connected. Instances
    of this class are returned by
    <function>MongoDB\Driver\Server::getServerDescription</function> and
    <classname>MongoDB\Driver\Monitoring\ServerChangedEvent</classname> methods.
   </para>
  </section>
<!-- }}} -->

  <section xml:id="mongodb-driver-serverdescription.synopsis">
   &reftitle.classsynopsis;

<!-- {{{ Synopsis -->
   <classsynopsis>
    <ooclass><classname>MongoDB\Driver\ServerDescription</classname></ooclass>

<!-- {{{ Class synopsis -->
    <classsynopsisinfo>
     <modifier>final</modifier>
     <ooclass>
      <classname>MongoDB\Driver\ServerDescription</classname>
     </ooclass>
    </classsynopsisinfo>
<!-- }}} -->
    <classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-unknown">MongoDB\Driver\ServerDescription::TYPE_UNKNOWN</varname>
     <initializer>"Unknown"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-standalone">MongoDB\Driver\ServerDescription::TYPE_STANDALONE</varname>
     <initializer>"Standalone"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-mongos">MongoDB\Driver\ServerDescription::TYPE_MONGOS</varname>
     <initializer>"Mongos"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-possible-primary">MongoDB\Driver\ServerDescription::TYPE_POSSIBLE_PRIMARY</varname>
     <initializer>"PossiblePrimary"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-rs-primary">MongoDB\Driver\ServerDescription::TYPE_RS_PRIMARY</varname>
     <initializer>"RSPrimary"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-rs-secondary">MongoDB\Driver\ServerDescription::TYPE_RS_SECONDARY</varname>
     <initializer>"RSSecondary"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-rs-arbiter">MongoDB\Driver\ServerDescription::TYPE_RS_ARBITER</varname>
     <initializer>"RSArbiter"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-rs-other">MongoDB\Driver\ServerDescription::TYPE_RS_OTHER</varname>
     <initializer>"RSOther"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-rs-ghost">MongoDB\Driver\ServerDescription::TYPE_RS_GHOST</varname>
     <initializer>"RSGhost"</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>string</type>
     <varname linkend="mongodb-driver-serverdescription.constants.type-load-balancer">MongoDB\Driver\ServerDescription::TYPE_LOAD_BALANCER</varname>
     <initializer>"LoadBalancer"</initializer>
    </fieldsynopsis>

    <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-driver-serverdescription')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
   </classsynopsis>
<!-- }}} -->

  </section>

<!-- {{{ MongoDB\Driver\ServerDescription constants -->
  <section xml:id="mongodb-driver-serverdescription.constants">
   &reftitle.constants;
   <variablelist>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-unknown">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_UNKNOWN</constant></term>
     <listitem>
      <para>Unknown server type, returned by <methodname>MongoDB\Driver\ServerDescription::getType</methodname>.</para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-standalone">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_STANDALONE</constant></term>
     <listitem>
      <para>Standalone server type, returned by <methodname>MongoDB\Driver\ServerDescription::getType</methodname>.</para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-mongos">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_MONGOS</constant></term>
     <listitem>
      <para>Mongos server type, returned by <methodname>MongoDB\Driver\ServerDescription::getType</methodname>.</para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-possible-primary">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_POSSIBLE_PRIMARY</constant></term>
     <listitem>
      <para>Replica set possible primary server type, returned by <methodname>MongoDB\Driver\ServerDescription::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-serverdescription.constants.type-rs-primary">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_RS_PRIMARY</constant></term>
     <listitem>
      <para>Replica set primary server type, returned by <methodname>MongoDB\Driver\ServerDescription::getType</methodname>.</para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-rs-secondary">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_RS_SECONDARY</constant></term>
     <listitem>
      <para>Replica set secondary server type, returned by <methodname>MongoDB\Driver\ServerDescription::getType</methodname>.</para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-rs-arbiter">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_RS_ARBITER</constant></term>
     <listitem>
      <para>Replica set arbiter server type, returned by <methodname>MongoDB\Driver\ServerDescription::getType</methodname>.</para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-rs-other">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_RS_OTHER</constant></term>
     <listitem>
      <para>Replica set other server type, returned by <methodname>MongoDB\Driver\ServerDescription::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-serverdescription.constants.type-rs-ghost">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_RS_GHOST</constant></term>
     <listitem>
      <para>Replica set ghost server type, returned by <methodname>MongoDB\Driver\ServerDescription::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>

    <varlistentry xml:id="mongodb-driver-serverdescription.constants.type-load-balancer">
     <term><constant>MongoDB\Driver\ServerDescription::TYPE_LOAD_BALANCER</constant></term>
     <listitem>
      <para>Load balancer server type, returned by <methodname>MongoDB\Driver\ServerDescription::getType</methodname>.</para>
     </listitem>
    </varlistentry>

   </variablelist>
  </section>
<!-- }}} -->

 </partintro>

 &reference.mongodb.mongodb.driver.entities.serverdescription;

</phpdoc:classref>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
