Class: Flor::TransientExecutor::TransientUnit
- Inherits:
-
Object
- Object
- Flor::TransientExecutor::TransientUnit
- Defined in:
- lib/flor/core/texecutor.rb
Instance Attribute Summary collapse
-
#archive ⇒ Object
Returns the value of attribute archive.
-
#conf ⇒ Object
Returns the value of attribute conf.
-
#journal ⇒ Object
readonly
Returns the value of attribute journal.
-
#loader ⇒ Object
readonly
Returns the value of attribute loader.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
- #archive_node(exid, node) ⇒ Object
- #has_tasker?(exid, tname) ⇒ Boolean
-
#initialize(conf) ⇒ TransientUnit
constructor
A new instance of TransientUnit.
- #notify(executor, msg) ⇒ Object
Constructor Details
#initialize(conf) ⇒ TransientUnit
Returns a new instance of TransientUnit.
14 15 16 17 18 19 20 21 |
# File 'lib/flor/core/texecutor.rb', line 14 def initialize(conf) @conf = conf @opts = {} @logger = TransientLogger.new(self) @journal = [] @archive = nil end |
Instance Attribute Details
#archive ⇒ Object
Returns the value of attribute archive.
12 13 14 |
# File 'lib/flor/core/texecutor.rb', line 12 def archive @archive end |
#conf ⇒ Object
Returns the value of attribute conf.
9 10 11 |
# File 'lib/flor/core/texecutor.rb', line 9 def conf @conf end |
#journal ⇒ Object (readonly)
Returns the value of attribute journal.
11 12 13 |
# File 'lib/flor/core/texecutor.rb', line 11 def journal @journal end |
#loader ⇒ Object (readonly)
Returns the value of attribute loader.
10 11 12 |
# File 'lib/flor/core/texecutor.rb', line 10 def loader @loader end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
10 11 12 |
# File 'lib/flor/core/texecutor.rb', line 10 def logger @logger end |
#opts ⇒ Object
Returns the value of attribute opts.
9 10 11 |
# File 'lib/flor/core/texecutor.rb', line 9 def opts @opts end |
Instance Method Details
#archive_node(exid, node) ⇒ Object
33 34 35 36 |
# File 'lib/flor/core/texecutor.rb', line 33 def archive_node(exid, node) (@archive[exid] ||= {})[node['nid']] = Flor.dup(node) if @archive end |
#has_tasker?(exid, tname) ⇒ Boolean
38 39 40 41 |
# File 'lib/flor/core/texecutor.rb', line 38 def has_tasker?(exid, tname) false end |
#notify(executor, msg) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/flor/core/texecutor.rb', line 23 def notify(executor, msg) return [] if msg['consumed'] @logger.notify(executor, msg) @journal << msg [] end |