Update return type for MongoDB\Driver\Server::getLatency()

https://jira.mongodb.org/browse/PHPC-1984
https://jira.mongodb.org/browse/PHPC-1985
This commit is contained in:
Jeremy Mikola 2021-10-25 13:48:47 -04:00
parent 377518d34b
commit 1aca69fa5d
No known key found for this signature in database
GPG key ID: 826DE44395E8A8FC

View file

@ -4,19 +4,20 @@
<refentry xml:id="mongodb-driver-server.getlatency" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\Driver\Server::getLatency</refname>
<refpurpose>Returns the latency of this server</refpurpose>
<refpurpose>Returns the latency of this server in milliseconds</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type>string</type><methodname>MongoDB\Driver\Server::getLatency</methodname>
<modifier>final</modifier> <modifier>public</modifier> <type class="union"><type>integer</type><type>null</type></type><methodname>MongoDB\Driver\Server::getLatency</methodname>
<void />
</methodsynopsis>
<para>
Returns the latency of this server (i.e. the client&apos;s measured
Returns the latency of this server in milliseconds. This is the client&apos;s
measured
<link xlink:href="&url.mongodb.sdam;#round-trip-time">round trip time</link>
of a <literal>hello</literal> command).
of a <literal>hello</literal> command.
</para>
</refsect1>
@ -28,7 +29,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the latency of this server.
Returns the latency of this server in milliseconds, or &null; if no latency
has been measured (e.g. client is connected to a load balancer).
</para>
</refsect1>
@ -39,6 +41,31 @@
</simplelist>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.11.0</entry>
<entry>
This method will return &null; if no latency has been measured. In
earlier versions, an integer was always returned and an unset value
might be reported as <literal>-1</literal>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
@ -67,7 +94,6 @@ int(592)
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>