CosTransac...Terminator(3)
β¨ NAME β¨
okay so bestie, welcome to CosTransactions_Terminator β this is the Erlang module (you'll see it hanging out under the manual name CosTransac...Terminator(3), yes the title got cut off mid-word, we don't talk about it π). This module implements the OMG CosTransactions::Terminator interface. it's giving very "official spec but make it Erlang." π
π¦ DESCRIPTION π¦
so like, first things first: you wanna get access to the record definitions for the structures? you literally have to do this, no skipping:
-include_lib("cosTransactions/include/CosTransactions.hrl").
that's it. that's the whole vibe. include it or you're not getting in the group chat π
π EXPORTS π
πΈ commit(Terminator, ReportHeuristics) -> Return
Types:
Terminator = #objref
ReportHeuristics = boolean()
Return = ok | {'EXCEPTION', E}
E = #'CosTransactions_HeuristicMixed'{} |
#'CosTransactions_HeuristicHazrd'{} |
#'CosTransactions_TransactionRolledBack'{}
okay so this operation initiates the two-phase commit protocol. that's the main character moment right there. β¨
if the transaction has not been marked 'rollback only' and all the participants agree to commit? the operation terminates normally. slay. everything ate, no crumbs. π«Ά
otherwise, TransactionRolledBack is raised. not the vibe, but that's the rules. π
and if the parameter ReportHeuristics is true and inconsistent outcomes by raising an Heuristic Exception. π
fr fr, that last sentence is exactly how the original spells it out β I'm not editing the lore, bestie. iykyk.
π¦ rollback(Terminator) -> Return
Types:
Terminator = #objref
Return = ok
this operation roles back the transaction. that's the whole thing. iconic, brief, does not over-explain itself. periodt. π
that's the whole module bestie, go forth and commit responsibly π
sign-off: brought to you by Ericsson AB π, version cosTransactions 5.2.2 π, living under the manual name CosTransac...Terminator(3) β mwah, drink water, and always include your .hrl π§β¨
π¦ 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