Class: Dynflow::TransactionAdapters::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/dynflow/transaction_adapters/abstract.rb

Direct Known Subclasses

ActiveRecord, None

Instance Method Summary collapse

Instance Method Details

#check(world) ⇒ Object

Called after World instantiation, it can be used to check Dynflow configuration etc.



21
22
23
# File 'lib/dynflow/transaction_adapters/abstract.rb', line 21

def check(world)
  # override if needed
end

#cleanupObject

Called on each thread after work is done. E.g. it’s used to checkin ActiveRecord connections back to pool.



16
17
18
# File 'lib/dynflow/transaction_adapters/abstract.rb', line 16

def cleanup
  # override if needed
end

#rollbackObject

rollback the transaction

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/dynflow/transaction_adapters/abstract.rb', line 10

def rollback
  raise NotImplementedError
end

#transaction(&block) ⇒ Object

start transaction around block

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/dynflow/transaction_adapters/abstract.rb', line 5

def transaction(&block)
  raise NotImplementedError
end