svn: /phpdoc/ru/trunk/reference/mongodb/mongodb/driver/readpreference/ construct.xml

[email protected] (Sergey Panteleev)
Newsgroups php.doc.ru
Message-ID <[email protected]>
sergey                                   Sat, 30 May 2020 18:33:37 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=349994

Log:
docs(ru): Updated to English revision

Changed paths:
    U   phpdoc/ru/trunk/reference/mongodb/mongodb/driver/readpreference/construct.xml

Modified: phpdoc/ru/trunk/reference/mongodb/mongodb/driver/readpreference/construct.xml
===================================================================
--- phpdoc/ru/trunk/reference/mongodb/mongodb/driver/readpreference/construct.xml	2020-05-29 13:58:25 UTC (rev 349993)
+++ phpdoc/ru/trunk/reference/mongodb/mongodb/driver/readpreference/construct.xml	2020-05-30 18:33:37 UTC (rev 349994)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 344127 Maintainer: lex Status: ready -->
+<!-- EN-Revision: 349992 Maintainer: lex Status: ready -->
 <!-- Reviewed: no -->

 <refentry xml:id="mongodb-driver-readpreference.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -130,6 +130,20 @@
         </thead>
         <tbody>
          <row>
+          <entry>hedge</entry>
+          <entry><type>object|array</type></entry>
+          <entry>
+           <para>Указывает, использовать ли хеджированные чтения.</para>
+           <para>
+            Хеджированные чтения с сервера доступны для всех неосновных предпочтений чтения
+            и включаются по умолчанию при использовании режима <literal>"nearest"</literal>.
+            Объект позволяет явно разрешить чтение с хеджированием на сервере для
+            неосновных предпочтений чтения, а также отключить их
+            для предпочтения чтения <literal>"nearest"</literal>.
+           </para>
+          </entry>
+         </row>
+         <row>
           <entry>maxStalenessSeconds</entry>
           <entry><type>integer</type></entry>
           <entry>
@@ -231,6 +245,9 @@
 /* Require a secondary node whose replication lag is within two minutes of the primary */
 var_dump(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 120]));

+/* Явно включить хеджирование чтения на сервере */
+var_dump(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['hedge' => ['enabled' => true]]));
+
 ?>
 ]]>
    </programlisting>
@@ -259,6 +276,15 @@
   ["maxStalenessSeconds"]=>
   int(120)
 }
+object(MongoDB\Driver\ReadPreference)#1 (2) {
+  ["mode"]=>
+  string(9) "secondary"
+  ["hedge"]=>
+  object(stdClass)#1 (1) {
+    ["enabled"]=>
+    bool(true)
+  }
+}
 ]]>
    </screen>
   </example>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.