Class Transaction::Simple::ThreadSafe::Group
In: lib/transaction/simple/threadsafe/group.rb
Parent: Transaction::Simple::Group
TransactionError TransactionThreadError Exception TransactionCommitted TransactionAborted StandardError Group Group lib/transaction/simple/threadsafe.rb lib/transaction/simple.rb lib/transaction/simple/group.rb lib/transaction/simple/threadsafe/group.rb ThreadSafe Simple Transaction dot/m_3_0.png

A transaction group is an object wrapper that manages a group of objects as if they were a single object for the purpose of transaction management. All transactions for this group of objects should be performed against the transaction group object, not against individual objects in the group. This is the threadsafe version of a transaction group.

Methods

new  

Public Class methods

[Source]

    # File lib/transaction/simple/threadsafe/group.rb, line 23
23:   def initialize(*objects)
24:     @objects = objects || []
25:     @objects.freeze
26:     @objects.each { |obj| obj.extend(Transaction::Simple::ThreadSafe) }
27: 
28:     if block_given?
29:       begin
30:         yield self
31:       ensure
32:         self.clear
33:       end
34:     end
35:   end

[Validate]