Class: Arxutils::TransactState

Inherits:
Object
  • Object
show all
Defined in:
lib/arxutils/transactstate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTransactState

Returns a new instance of TransactState.



5
6
7
8
# File 'lib/arxutils/transactstate.rb', line 5

def initialize
  @ids = []
  @state = :NONE
end

Instance Attribute Details

#idsObject

Returns the value of attribute ids.



3
4
5
# File 'lib/arxutils/transactstate.rb', line 3

def ids
  @ids
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/arxutils/transactstate.rb', line 3

def state
  @state
end

Instance Method Details

#add(xid) ⇒ Object



10
11
12
# File 'lib/arxutils/transactstate.rb', line 10

def add( xid )
  @ids << xid if @state == :TRACE
end

#clearObject



14
15
16
# File 'lib/arxutils/transactstate.rb', line 14

def clear
  @ids = []
end

#need?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/arxutils/transactstate.rb', line 18

def need?
  @ids.size > 0
end