Class: ScbiMapreduce::WorkManagerData

Inherits:
Object
  • Object
show all
Defined in:
lib/scbi_mapreduce/work_manager.rb

Constant Summary collapse

@@job_id =
1

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#dataObject

Returns the value of attribute data.



26
27
28
# File 'lib/scbi_mapreduce/work_manager.rb', line 26

def data
  @data
end

#job_identifierObject (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

#statusObject

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_idObject



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

#inspectObject



36
37
38
# File 'lib/scbi_mapreduce/work_manager.rb', line 36

def inspect
  return "WorkManagerData: #{@job_identifier} => #{@status}"
end