cosTransactions(3)
π cosTransactions π
okay bestie, welcome to cosTransactions(3) β it's an Erlang Module Definition, and yes this is THE main module of the cosTransactions application. sit down, grab a boba, we're doing distributed transactions and we're doing them cutely. π«Ά
β¨ NAME β¨
cosTransactions β the main module of the cosTransactions application. that's it, that's the name, she's the main character of the whole app. π
πΈ DESCRIPTION πΈ
so first things first, if you want the record definitions for the structures, you gotta include this:
-include_lib("cosTransactions/include/CosTransactions.hrl").
no cap, do it or your structs simply will not exist. π
This module contains the functions for starting and stopping the application. If the application is started using application:start(cosTransactions) the default configuration is used (see listing below, bestie, it's right there). The Factory reference is stored using the CosNaming Service under the id "oe_cosTransactionsFac_IPNo". π
The following application configuration parameters exist:
- maxRetries β default is
40times, i.e., if a transaction participant is unreachable the application will retry to contact it N times. Reaching the maximum is considered to be a disaster. π like genuinely, disaster. - comFailWait β default is
5000milliseconds, i.e., before the application retries to contact unreachable transaction participants the application wait Time milliseconds. she's just... waiting. patiently. π
π¦ EXPORTS π¦
β¨ start() -> Return β¨
Types:
Return = ok | {error, Reason}
This operation starts the cosTransactions application. go girl, boot up. π₯
β¨ stop() -> Return β¨
Types:
Return = ok | {error, Reason}
This operation stops the cosTransactions application. bye bestie, rest well. π΄
β¨ start_factory() -> TransactionFactory β¨
Types:
TransactionFactory = #objref
This operation creates a Transaction Factory. The Factory is used to create a new top-level transaction using default options (see listing below). it's giving "just use the defaults, she's fine". β¨
β¨ start_factory(FacDef) -> TransactionFactory β¨
Types:
FacDef = [Options], see Option listing below.
TransactionFactory = #objref
This operation creates a Transaction Factory. The Factory is used to create a new top-level transaction.
The FacDef list must be a list of {Item, Value} tuples, where the following values are allowed:
{hash_max, HashValue}β This value denotes the upper bound of the hash value the Coordinator uses. Default is1013.HashValuemust be an integer. π’{allow_subtr, Boolean}β If set totrueit is possible to create subtransactions. Default istrue. nesting hours, lowkey iconic. πͺ{typecheck, Boolean}β If set to totrueall transaction operation's arguments will be type-checked. Default istrue. (yes the original says "set to to", we don't fix, we respect. π){tty, Boolean}β Enables or disables error printouts to the tty. IfFlagisfalse, all text that the error logger would have sent to the terminal is discarded. IfFlagistrue, error messages are sent to the terminal screen. π₯οΈ{logfile, FileName}β This function makes it possible to store all system information inFileName(string()). It can be used in combination with thetty(false)item in to have a silent system, where all system information are logged to a file. As default no logfile is used. π€«{maxRetries, Integer}β default is40times, i.e., if a transaction participant is unreachable the application will retry to contact it N times. Reaching the maximum is considered to be a disaster. This option overrides the application configuration parameter. π{comFailWait, Integer}β default is5000milliseconds, i.e., before the application retries to contact unreachable transaction participants the application wait Time milliseconds. This option overrides the application configuration parameter. β³
β¨ stop_factory(TransactionFactory) -> Reply β¨
Types:
TransactionFactory = #objref
Reply = ok | {'EXCEPTION', E}
This operation stop the target transaction factory. (yes, "stop", not "stops" β we keep it exactly as she is, fr fr. π)
heads up bestie: that{'EXCEPTION', E}reply is real, so don't be out here assuming it's alwaysok. π
okay that's the whole page, you ate it, you understood it, you're basically a distributed transaction girlie now. πβ¨
sign-off time: this lil masterpiece is brought to you by Ericsson AB, running version cosTransactions 5.2.2 β and ngl the footer didn't hand me a date so we're not making one up, that's the rules. π ππ¦
π¦ where this page comes from
- fedora 43: erlang-cosTransactions 1:5.2.2-1.fc43 Β· Apache-2.0
- fedora 44: erlang-cosTransactions 1:5.2.2-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms