Class: ScbiMapreduce::WorkManagerData
- Inherits:
-
Object
- Object
- ScbiMapreduce::WorkManagerData
- Defined in:
- lib/scbi_mapreduce/work_manager.rb
Constant Summary collapse
- @@job_id =
1
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#job_identifier ⇒ Object
readonly
Returns the value of attribute job_identifier.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(job) ⇒ WorkManagerData
constructor
A new instance of WorkManagerData.
- #inspect ⇒ Object
Constructor Details
#initialize(job) ⇒ WorkManagerData
Returns a new instance of WorkManagerData.
28 29 30 31 32 33 34 |
# File 'lib/scbi_mapreduce/work_manager.rb', line 28 def initialize(job) @job_identifier=@@job_id @@job_id+=1 @data=job @status=:running end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
26 27 28 |
# File 'lib/scbi_mapreduce/work_manager.rb', line 26 def data @data end |
#job_identifier ⇒ Object (readonly)
Returns the value of attribute job_identifier.
25 26 27 |
# File 'lib/scbi_mapreduce/work_manager.rb', line 25 def job_identifier @job_identifier end |
#status ⇒ Object
Returns the value of attribute status.
26 27 28 |
# File 'lib/scbi_mapreduce/work_manager.rb', line 26 def status @status end |
Class Method Details
.job_id ⇒ Object
45 46 47 48 |
# File 'lib/scbi_mapreduce/work_manager.rb', line 45 def self.job_id # puts "Setting job_id to #{c}" @@job_id end |
.job_id=(c) ⇒ Object
40 41 42 43 |
# File 'lib/scbi_mapreduce/work_manager.rb', line 40 def self.job_id=(c) # puts "Setting job_id to #{c}" @@job_id=c end |
Instance Method Details
#inspect ⇒ Object
36 37 38 |
# File 'lib/scbi_mapreduce/work_manager.rb', line 36 def inspect return "WorkManagerData: #{@job_identifier} => #{@status}" end |