CosTransac...Terminator(3)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

✨ 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