Class: Calvin::Executor::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/spinoza/calvin/executor.rb

Overview

Represents the state of executing one transaction in this Executor, in the case where that execution involves waiting for data from peers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(txn, read_results: [], remote_read_tables: ) ⇒ Task

Returns a new instance of Task.



31
32
33
34
35
# File 'lib/spinoza/calvin/executor.rb', line 31

def initialize txn, read_results: [], remote_read_tables: Set[]
  @txn = txn
  @read_results = read_results
  @remote_read_tables = remote_read_tables
end

Instance Attribute Details

#read_resultsObject

Accumulates results as they arrive locally and from peers.



26
27
28
# File 'lib/spinoza/calvin/executor.rb', line 26

def read_results
  @read_results
end

#remote_read_tablesObject

Set of tables the task is waiting for.



29
30
31
# File 'lib/spinoza/calvin/executor.rb', line 29

def remote_read_tables
  @remote_read_tables
end

#txnObject (readonly)

Returns the value of attribute txn.



23
24
25
# File 'lib/spinoza/calvin/executor.rb', line 23

def txn
  @txn
end