Skip to content

Commit bd6e660

Browse files
committed
SDAM monitoring classes and server/topology descriptions
https://jira.mongodb.org/browse/PHPC-1150
1 parent b5275f7 commit bd6e660

File tree

73 files changed

+4384
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4384
-16
lines changed

reference/mongodb/mongodb.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
&reference.mongodb.mongodb.driver.cursorinterface;
2323

2424
&reference.mongodb.mongodb.driver.server;
25+
&reference.mongodb.mongodb.driver.serverdescription;
26+
&reference.mongodb.mongodb.driver.topologydescription;
2527

2628
&reference.mongodb.mongodb.driver.writeconcernerror;
2729
&reference.mongodb.mongodb.driver.writeerror;

reference/mongodb/mongodb/driver/monitoring/commandsubscriber/commandfailed.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
<methodparam><type>MongoDB\Driver\Monitoring\CommandFailedEvent</type><parameter>event</parameter></methodparam>
1515
</methodsynopsis>
1616
<para>
17-
If the subscriber has been registered with
18-
<function>MongoDB\Driver\Monitoring\addSubscriber</function>, the driver will
19-
call this method when a command has failed.
17+
If the subscriber has been registered, the driver will call this method when
18+
a command has failed.
2019
</para>
2120
</refsect1>
2221

@@ -53,6 +52,7 @@
5352
<simplelist>
5453
<member><classname>MongoDB\Driver\Monitoring\CommandFailedEvent</classname></member>
5554
<member><function>MongoDB\Driver\Monitoring\addSubscriber</function></member>
55+
<member><function>MongoDB\Driver\Manager::addSubscriber</function></member>
5656
<member><xref linkend="mongodb.tutorial.apm" /></member>
5757
</simplelist>
5858
</refsect1>

reference/mongodb/mongodb/driver/monitoring/commandsubscriber/commandstarted.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
<methodparam><type>MongoDB\Driver\Monitoring\CommandStartedEvent</type><parameter>event</parameter></methodparam>
1515
</methodsynopsis>
1616
<para>
17-
If the subscriber has been registered with
18-
<function>MongoDB\Driver\Monitoring\addSubscriber</function>, the driver will
19-
call this method when a command has started.
17+
If the subscriber has been registered, the driver will call this method when
18+
a command has started.
2019
</para>
2120
</refsect1>
2221

@@ -53,6 +52,7 @@
5352
<simplelist>
5453
<member><classname>MongoDB\Driver\Monitoring\CommandStartedEvent</classname></member>
5554
<member><function>MongoDB\Driver\Monitoring\addSubscriber</function></member>
55+
<member><function>MongoDB\Driver\Manager::addSubscriber</function></member>
5656
<member><xref linkend="mongodb.tutorial.apm" /></member>
5757
</simplelist>
5858
</refsect1>

reference/mongodb/mongodb/driver/monitoring/commandsubscriber/commandsucceeded.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
<methodparam><type>MongoDB\Driver\Monitoring\CommandSucceededEvent</type><parameter>event</parameter></methodparam>
1515
</methodsynopsis>
1616
<para>
17-
If the subscriber has been registered with
18-
<function>MongoDB\Driver\Monitoring\addSubscriber</function>, the driver will
19-
call this method when a command has succeeded.
17+
If the subscriber has been registered, the driver will call this method when
18+
a command has succeeded.
2019
</para>
2120
</refsect1>
2221

@@ -53,6 +52,7 @@
5352
<simplelist>
5453
<member><classname>MongoDB\Driver\Monitoring\CommandSucceededEvent</classname></member>
5554
<member><function>MongoDB\Driver\Monitoring\addSubscriber</function></member>
55+
<member><function>MongoDB\Driver\Manager::addSubscriber</function></member>
5656
<member><xref linkend="mongodb.tutorial.apm" /></member>
5757
</simplelist>
5858
</refsect1>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
4+
<phpdoc:classref xml:id="class.mongodb-driver-monitoring-sdamsubscriber" 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">
5+
6+
<title>The MongoDB\Driver\Monitoring\SDAMSubscriber interface</title>
7+
<titleabbrev>MongoDB\Driver\Monitoring\SDAMSubscriber</titleabbrev>
8+
9+
<partintro>
10+
11+
<!-- {{{ MongoDB\Driver\Monitoring\SDAMSubscriber intro -->
12+
<section xml:id="mongodb-driver-monitoring-sdamsubscriber.intro">
13+
&reftitle.intro;
14+
<para>
15+
Classes may implement this interface to register an event subscriber that is
16+
notified for various SDAM events. See the
17+
<link xlink:href="&url.mongodb.sdam;">Server Discovery and Monitoring</link>
18+
and <link xlink:href="&url.mongodb.sdam-monitoring;">SDAM Monitoring</link>
19+
specifications for additional information.
20+
</para>
21+
</section>
22+
<!-- }}} -->
23+
24+
<section xml:id="mongodb-driver-monitoring-sdamsubscriber.synopsis">
25+
&reftitle.interfacesynopsis;
26+
27+
<!-- {{{ Synopsis -->
28+
<classsynopsis>
29+
<ooclass><classname>MongoDB\Driver\Monitoring\SDAMSubscriber</classname></ooclass>
30+
31+
<!-- {{{ Class synopsis -->
32+
<classsynopsisinfo>
33+
<ooclass>
34+
<classname>MongoDB\Driver\Monitoring\SDAMSubscriber</classname>
35+
</ooclass>
36+
37+
<oointerface>
38+
<interfacename>MongoDB\Driver\Monitoring\Subscriber</interfacename>
39+
</oointerface>
40+
</classsynopsisinfo>
41+
<!-- }}} -->
42+
43+
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
44+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-driver-monitoring-sdamsubscriber')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
45+
</classsynopsis>
46+
<!-- }}} -->
47+
48+
</section>
49+
50+
</partintro>
51+
52+
&reference.mongodb.mongodb.driver.monitoring.entities.sdamsubscriber;
53+
54+
</phpdoc:classref>
55+
56+
<!-- Keep this comment at the end of the file
57+
Local variables:
58+
mode: sgml
59+
sgml-omittag:t
60+
sgml-shorttag:t
61+
sgml-minimize-attributes:nil
62+
sgml-always-quote-attributes:t
63+
sgml-indent-step:1
64+
sgml-indent-data:t
65+
indent-tabs-mode:nil
66+
sgml-parent-document:nil
67+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
68+
sgml-exposed-tags:nil
69+
sgml-local-catalogs:nil
70+
sgml-local-ecat-files:nil
71+
End:
72+
vim600: syn=xml fen fdm=syntax fdl=2 si
73+
vim: et tw=78 syn=sgml
74+
vi: ts=1 sw=1
75+
-->
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
4+
<refentry xml:id="mongodb-driver-monitoring-sdamsubscriber.serverchanged" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>MongoDB\Driver\Monitoring\SDAMSubscriber::serverChanged</refname>
7+
<refpurpose>Notification method for a server description change</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis>
13+
<modifier>abstract</modifier> <modifier>public</modifier> <type>void</type><methodname>MongoDB\Driver\Monitoring\SDAMSubscriber::serverChanged</methodname>
14+
<methodparam><type>MongoDB\Driver\Monitoring\ServerChangedEvent</type><parameter>event</parameter></methodparam>
15+
</methodsynopsis>
16+
<para>
17+
If the subscriber has been registered, the driver will call this method when
18+
a server's description has changed.
19+
</para>
20+
</refsect1>
21+
22+
<refsect1 role="parameters">
23+
&reftitle.parameters;
24+
<variablelist>
25+
<varlistentry>
26+
<term><parameter>event</parameter> (<type>MongoDB\Driver\Monitoring\ServerChangedEvent</type>)</term>
27+
<listitem>
28+
<para>
29+
An event object encapsulating information about the changed server
30+
description.
31+
</para>
32+
</listitem>
33+
</varlistentry>
34+
</variablelist>
35+
</refsect1>
36+
37+
<refsect1 role="returnvalues">
38+
&reftitle.returnvalues;
39+
<para>
40+
&return.void;
41+
</para>
42+
</refsect1>
43+
44+
<refsect1 role="errors">
45+
&reftitle.errors;
46+
<simplelist>
47+
&mongodb.throws.argumentparsing;
48+
</simplelist>
49+
</refsect1>
50+
51+
<refsect1 role="seealso">
52+
&reftitle.seealso;
53+
<simplelist>
54+
<member><classname>MongoDB\Driver\Monitoring\ServerChangedEvent</classname></member>
55+
<member><function>MongoDB\Driver\Monitoring\addSubscriber</function></member>
56+
<member><function>MongoDB\Driver\Manager::addSubscriber</function></member>
57+
</simplelist>
58+
</refsect1>
59+
60+
</refentry>
61+
62+
<!-- Keep this comment at the end of the file
63+
Local variables:
64+
mode: sgml
65+
sgml-omittag:t
66+
sgml-shorttag:t
67+
sgml-minimize-attributes:nil
68+
sgml-always-quote-attributes:t
69+
sgml-indent-step:1
70+
sgml-indent-data:t
71+
indent-tabs-mode:nil
72+
sgml-parent-document:nil
73+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
74+
sgml-exposed-tags:nil
75+
sgml-local-catalogs:nil
76+
sgml-local-ecat-files:nil
77+
End:
78+
vim600: syn=xml fen fdm=syntax fdl=2 si
79+
vim: et tw=78 syn=sgml
80+
vi: ts=1 sw=1
81+
-->
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
4+
<refentry xml:id="mongodb-driver-monitoring-sdamsubscriber.serverclosed" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>MongoDB\Driver\Monitoring\SDAMSubscriber::serverClosed</refname>
7+
<refpurpose>Notification method for closing a server</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis>
13+
<modifier>abstract</modifier> <modifier>public</modifier> <type>void</type><methodname>MongoDB\Driver\Monitoring\SDAMSubscriber::serverClosed</methodname>
14+
<methodparam><type>MongoDB\Driver\Monitoring\ServerClosedEvent</type><parameter>event</parameter></methodparam>
15+
</methodsynopsis>
16+
<para>
17+
If the subscriber has been registered, the driver will call this method when
18+
a server is closed.
19+
</para>
20+
</refsect1>
21+
22+
<refsect1 role="parameters">
23+
&reftitle.parameters;
24+
<variablelist>
25+
<varlistentry>
26+
<term><parameter>event</parameter> (<type>MongoDB\Driver\Monitoring\ServerClosedEvent</type>)</term>
27+
<listitem>
28+
<para>
29+
An event object encapsulating information about the closed server.
30+
</para>
31+
</listitem>
32+
</varlistentry>
33+
</variablelist>
34+
</refsect1>
35+
36+
<refsect1 role="returnvalues">
37+
&reftitle.returnvalues;
38+
<para>
39+
&return.void;
40+
</para>
41+
</refsect1>
42+
43+
<refsect1 role="errors">
44+
&reftitle.errors;
45+
<simplelist>
46+
&mongodb.throws.argumentparsing;
47+
</simplelist>
48+
</refsect1>
49+
50+
<refsect1 role="seealso">
51+
&reftitle.seealso;
52+
<simplelist>
53+
<member><classname>MongoDB\Driver\Monitoring\ServerClosedEvent</classname></member>
54+
<member><function>MongoDB\Driver\Monitoring\addSubscriber</function></member>
55+
<member><function>MongoDB\Driver\Manager::addSubscriber</function></member>
56+
</simplelist>
57+
</refsect1>
58+
59+
</refentry>
60+
61+
<!-- Keep this comment at the end of the file
62+
Local variables:
63+
mode: sgml
64+
sgml-omittag:t
65+
sgml-shorttag:t
66+
sgml-minimize-attributes:nil
67+
sgml-always-quote-attributes:t
68+
sgml-indent-step:1
69+
sgml-indent-data:t
70+
indent-tabs-mode:nil
71+
sgml-parent-document:nil
72+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
73+
sgml-exposed-tags:nil
74+
sgml-local-catalogs:nil
75+
sgml-local-ecat-files:nil
76+
End:
77+
vim600: syn=xml fen fdm=syntax fdl=2 si
78+
vim: et tw=78 syn=sgml
79+
vi: ts=1 sw=1
80+
-->
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
4+
<refentry xml:id="mongodb-driver-monitoring-sdamsubscriber.serverheartbeatfailed" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refnamediv>
6+
<refname>MongoDB\Driver\Monitoring\SDAMSubscriber::serverHeartbeatFailed</refname>
7+
<refpurpose>Notification method for a failed server heartbeat</refpurpose>
8+
</refnamediv>
9+
10+
<refsect1 role="description">
11+
&reftitle.description;
12+
<methodsynopsis>
13+
<modifier>abstract</modifier> <modifier>public</modifier> <type>void</type><methodname>MongoDB\Driver\Monitoring\SDAMSubscriber::serverHeartbeatFailed</methodname>
14+
<methodparam><type>MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent</type><parameter>event</parameter></methodparam>
15+
</methodsynopsis>
16+
<para>
17+
If the subscriber has been registered, the driver will call this method when
18+
a server heartbeat (i.e.
19+
<link xlink:href="&url.mongodb.docs;reference/command/hello/">hello</link>
20+
command issued through
21+
<link xlink:href="&url.mongodb.sdam;">server monitoring</link>) has failed.
22+
</para>
23+
</refsect1>
24+
25+
<refsect1 role="parameters">
26+
&reftitle.parameters;
27+
<variablelist>
28+
<varlistentry>
29+
<term><parameter>event</parameter> (<type>MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent</type>)</term>
30+
<listitem>
31+
<para>
32+
An event object encapsulating information about the failed server
33+
heartbeat.
34+
</para>
35+
</listitem>
36+
</varlistentry>
37+
</variablelist>
38+
</refsect1>
39+
40+
<refsect1 role="returnvalues">
41+
&reftitle.returnvalues;
42+
<para>
43+
&return.void;
44+
</para>
45+
</refsect1>
46+
47+
<refsect1 role="errors">
48+
&reftitle.errors;
49+
<simplelist>
50+
&mongodb.throws.argumentparsing;
51+
</simplelist>
52+
</refsect1>
53+
54+
<refsect1 role="seealso">
55+
&reftitle.seealso;
56+
<simplelist>
57+
<member><classname>MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent</classname></member>
58+
<member><function>MongoDB\Driver\Monitoring\addSubscriber</function></member>
59+
<member><function>MongoDB\Driver\Manager::addSubscriber</function></member>
60+
</simplelist>
61+
</refsect1>
62+
63+
</refentry>
64+
65+
<!-- Keep this comment at the end of the file
66+
Local variables:
67+
mode: sgml
68+
sgml-omittag:t
69+
sgml-shorttag:t
70+
sgml-minimize-attributes:nil
71+
sgml-always-quote-attributes:t
72+
sgml-indent-step:1
73+
sgml-indent-data:t
74+
indent-tabs-mode:nil
75+
sgml-parent-document:nil
76+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
77+
sgml-exposed-tags:nil
78+
sgml-local-catalogs:nil
79+
sgml-local-ecat-files:nil
80+
End:
81+
vim600: syn=xml fen fdm=syntax fdl=2 si
82+
vim: et tw=78 syn=sgml
83+
vi: ts=1 sw=1
84+
-->

0 commit comments

Comments
 (0)