reference/oci8/functions/oci-register-taf-callback.xml
ed6de1ae20ce16c0c7be0b3fef282b6065bebfac
...
...
@@ -0,0 +1,112 @@
1
+
<?xml version="1.0" encoding="utf-8"?>
2
+
<!-- $Revision$ -->
3
+
<refentry xml:id="function.oci-register-taf-callback" xmlns="http://docbook.org/ns/docbook">
4
+
<refnamediv>
5
+
<refname>oci_register_taf_callback</refname>
6
+
<refpurpose>Register a user-defined callback function for Oracle Database TAF</refpurpose>
7
+
</refnamediv>
8
+
9
+
<refsect1 role="description">
10
+
&reftitle.description;
11
+
<methodsynopsis>
12
+
<type>bool</type><methodname>oci_register_taf_callback</methodname>
13
+
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
14
+
<methodparam><type class="union"><type>callable</type><type>null</type></type><parameter>callback</parameter></methodparam>
15
+
</methodsynopsis>
16
+
<para>
17
+
Registers a user-defined callback function to <parameter>connection</parameter>.
18
+
If <parameter>connection</parameter> fails due to instance or network failure,
19
+
the registered callback function will be invoked for several times during
20
+
failover. See <link linkend="oci8.taf">OCI8 Transparent Application Failover
21
+
(TAF) Support</link> for information.
22
+
</para>
23
+
<para>
24
+
When <function>oci_register_taf_callback</function> is called multiple times,
25
+
each registration overwrites the previous one.
26
+
</para>
27
+
<para>
28
+
Use <function>oci_unregister_taf_callback</function> to explicitly unregister a
29
+
user-defined callback.
30
+
</para>
31
+
<para>
32
+
TAF callback registration will NOT be saved across
33
+
persistent connections, therefore the callback needs to be re-registered for
34
+
a new persistent connection.
35
+
</para>
36
+
</refsect1>
37
+

38
+
<refsect1 role="parameters">
39
+
&reftitle.parameters;
40
+
<para>
41
+
<variablelist>
42
+
<varlistentry>
43
+
<term><parameter>connection</parameter></term>
44
+
<listitem>
45
+
<para>
46
+
An Oracle connection identifier.
47
+
</para>
48
+
</listitem>
49
+
</varlistentry>
50
+
<varlistentry>
51
+
<term><parameter>callback</parameter></term>
52
+
<listitem>
53
+
<para>
54
+
A user-defined callback to register for Oracle TAF. It can be a
55
+
string of the function name or a Closure (anonymous function).
56
+
</para>
57
+
<para>
58
+
The interface of a TAF user-defined callback function is as follows:
59
+
</para>
60
+
<methodsynopsis>
61
+
<type>int</type><methodname>userCallbackFn</methodname>
62
+
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
63
+
<methodparam><type>int</type><parameter>event</parameter></methodparam>
64
+
<methodparam><type>int</type><parameter>type</parameter></methodparam>
65
+
</methodsynopsis>
66
+
<para>
67
+
See the parameter description and an example on <link linkend="oci8.taf">
68
+
OCI8 Transparent Application Failover (TAF) Support</link> page.
69
+
</para>
70
+
</listitem>
71
+
</varlistentry>
72
+
</variablelist>
73
+
</para>
74
+
</refsect1>
75
+

76
+
<refsect1 role="returnvalues">
77
+
&reftitle.returnvalues;
78
+
<para>
79
+
&return.success;
80
+
</para>
81
+
</refsect1>
82
+

83
+
<refsect1 role="seealso">
84
+
&reftitle.seealso;
85
+
<para>
86
+
<simplelist>
87
+
<member><function>oci_unregister_taf_callback</function></member>
88
+
</simplelist>
89
+
</para>
90
+
</refsect1>
91
+

92
+
</refentry>
93
+
<!-- Keep this comment at the end of the file
94
+
Local variables:
95
+
mode: sgml
96
+
sgml-omittag:t
97
+
sgml-shorttag:t
98
+
sgml-minimize-attributes:nil
99
+
sgml-always-quote-attributes:t
100
+
sgml-indent-step:1
101
+
sgml-indent-data:t
102
+
indent-tabs-mode:nil
103
+
sgml-parent-document:nil
104
+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
105
+
sgml-exposed-tags:nil
106
+
sgml-local-catalogs:nil
107
+
sgml-local-ecat-files:nil
108
+
End:
109
+
vim600: syn=xml fen fdm=syntax fdl=2 si
110
+
vim: et tw=78 syn=sgml
111
+
vi: ts=1 sw=1
112
+
-->
0
113