1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1999</year><year>2009</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
</legalnotice>
<title>CosTransactions_Coordinator</title>
<prepared></prepared>
<docno></docno>
<checked></checked>
<date>1999-04-12</date>
<rev>PA1</rev>
</header>
<module>CosTransactions_Coordinator</module>
<modulesummary>This module implements the OMG CosTransactions::Coordinator interface.</modulesummary>
<description>
<p>To get access to the record definitions for the structures use: <br></br>
<c>-include_lib("cosTransactions/include/CosTransactions.hrl").</c></p>
</description>
<funcs>
<func>
<name>create_subtransaction(Coordinator) -> Control</name>
<fsummary>Create a new subtransaction.</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Control = #objref</v>
</type>
<desc>
<p>A new subtransaction is created whose parent is the Coordinator argument.</p>
<p>Raises exception:</p>
<list type="bulleted">
<item>'SubtransactionsUnavailable' - if nested transactions are not supported.</item>
<item>'Inactive' - if target transaction has already been prepared.</item>
</list>
</desc>
</func>
<func>
<name>get_transaction_name(Coordinator) -> Name</name>
<fsummary>Return the name associated with the object.</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Name = string() of type "oe_name@machine_type_timestamp"</v>
</type>
<desc>
<p>Returns a printable string, which describe the transaction. The main purpose is to support debugging.</p>
</desc>
</func>
<func>
<name>get_parent_status(Coordinator) -> Status</name>
<fsummary>Return the status of the parent transaction.</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Status = atom()</v>
</type>
<desc>
<p>Returns the status of the parent transaction
associated with the target object. If the target object is a top-level
transaction this operation is equivalent to <c>get_status/1</c> operation. </p>
<p>Possible Status replies:</p>
<list type="bulleted">
<item>'StatusCommitted'</item>
<item>'StatusCommitting'</item>
<item>'StatusMarkedRollback'</item>
<item>'StatusRollingBack'</item>
<item>'StatusRolledBack'</item>
<item>'StatusActive'</item>
<item>'StatusPrepared'</item>
<item>'StatusUnknown'</item>
<item>'StatusNoTransaction'</item>
<item>'StatusPreparing'</item>
</list>
</desc>
</func>
<func>
<name>get_status(Coordinator) -> Status</name>
<fsummary>Return the status of the transaction associated with the target object</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Status = atom()</v>
</type>
<desc>
<p>Returns the status of the transaction associated with the target object.</p>
</desc>
</func>
<func>
<name>get_top_level_status(Coordinator) -> Status</name>
<fsummary>Return the status of the top-level transaction associated with the target object</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Status = atom()</v>
</type>
<desc>
<p>Returns the status of the top-level transaction associated with the target object.</p>
</desc>
</func>
<func>
<name>hash_top_level_tran(Coordinator) -> Return</name>
<fsummary>Return a hash code for the top-level transaction associated with the target object</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Return = integer()</v>
</type>
<desc>
<p>Returns a hash code for the top-level transaction
associated with the target object. Equals the operation
<c>hash_transaction/1</c> if the target object is a top-level transaction.</p>
</desc>
</func>
<func>
<name>hash_transaction(Coordinator) -> Return</name>
<fsummary>Return a hash code for the transaction associated with the target object.</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Return = integer()</v>
</type>
<desc>
<p>Returns a hash code for the transaction associated with the target object.</p>
</desc>
</func>
<func>
<name>is_descendant_transaction(Coordinator, OtherCoordinator) -> Return</name>
<fsummary>Return a boolean which indicates whether the transaction associated with the target object is a descendant of the transaction associated with the parameter object</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>OtherCoordinator = #objref</v>
<v>Return = Boolean</v>
</type>
<desc>
<p>Returns true if the transaction associated with the target object is a
descendant of the transaction associated with the parameter object.</p>
</desc>
</func>
<func>
<name>is_same_transaction(Coordinator, OtherCoordinator) -> Return</name>
<fsummary>Return true if the transaction associated with the target object is related to the transaction associated with the parameter object</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>OtherCoordinator = #objref</v>
<v>Return = Boolean</v>
</type>
<desc>
<p>Returns true if the transaction associated with the target object is
related to the transaction associated with the parameter object.</p>
</desc>
</func>
<func>
<name>is_top_level_transaction(Coordinator) -> Return</name>
<fsummary>Return true if the transaction associated with the target object is a top-level transaction</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Return = Boolean</v>
</type>
<desc>
<p>Returns true if the transaction associated with the target object is
a top-level transaction.</p>
</desc>
</func>
<func>
<name>register_resource(Coordinator, Resource) -> RecoveryCoordinator</name>
<fsummary>Register the parameter <c>Resource</c>object as a participant in the transaction associated with the target object</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Resource = #objref</v>
<v>RecoveryCoordinator = #objref</v>
</type>
<desc>
<p>This operation registers the parameter <c>Resource</c> object as a participant in the
transaction associated with the target object. The <c>RecoveryCoordinator</c> returned
by this operation can be used by this Resource during recovery.</p>
<note>
<p>The Resources will be called in FIFO-order when preparing or committing.
Hence, be sure to register the Resources in the correct order.</p>
</note>
<p>Raises exception:</p>
<list type="bulleted">
<item>'Inactive' - if target transaction has already been prepared.</item>
</list>
</desc>
</func>
<func>
<name>register_subtran_aware(Coordinator, SubtransactionAwareResource) -> Return</name>
<fsummary>Register the parameter <c>SubtransactionAwareResource</c>object such that it will be notified when the transaction, associated wit the target object, has committed or rolled back</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Return = ok</v>
</type>
<desc>
<p>This operation registers the parameter <c>SubtransactionAwareResource</c> object such that
it will be notified when the transaction, associated wit the target object,
has committed or rolled back.</p>
<note>
<p>The Resources will be called in FIFO-order.
Hence, be sure to register the Resources in the correct order.</p>
</note>
</desc>
</func>
<func>
<name>rollback_only(Coordinator) -> Return</name>
<fsummary>Modify the transaction associated with the target object so the only possible outcome is to rollback the transaction</fsummary>
<type>
<v>Coordinator = #objref</v>
<v>Return = ok</v>
</type>
<desc>
<p>The transaction associated with the target object is modified so the only
possible outcome is to rollback the transaction.</p>
</desc>
</func>
</funcs>
</erlref>
|