Class: RightScale::BundleQueue
Overview
Abstract base class for a Bundle Queue.
Direct Known Subclasses
Constant Summary collapse
- FINAL_BUNDLE =
'end'- SHUTDOWN_BUNDLE =
'shutdown'
Instance Method Summary collapse
-
#activate ⇒ Object
Activate queue for execution, idempotent Any pending bundle will be run sequentially in order.
-
#active? ⇒ Boolean
Determines if queue is active.
-
#busy? ⇒ Boolean
Determines if queue is busy.
-
#clear ⇒ Object
Clear queue content.
-
#close ⇒ Object
Close queue so that further call to ‘push’ will be ignored.
-
#initialize(&continuation) ⇒ BundleQueue
constructor
Set continuation block to be called after ‘close’ is called.
-
#push(context) ⇒ Object
Push new context to bundle queue and run next bundle.
Constructor Details
#initialize(&continuation) ⇒ BundleQueue
Set continuation block to be called after ‘close’ is called
Block
continuation block
35 36 37 |
# File 'lib/instance/bundle_queue.rb', line 35 def initialize(&continuation) @continuation = continuation end |
Instance Method Details
#activate ⇒ Object
Activate queue for execution, idempotent Any pending bundle will be run sequentially in order
Return
- true
-
Always return true
52 53 54 |
# File 'lib/instance/bundle_queue.rb', line 52 def activate raise NotImplementedError.new("must be overridden") end |
#active? ⇒ Boolean
Determines if queue is active
Return
- active(Boolean)
-
true if queue is active
43 44 45 |
# File 'lib/instance/bundle_queue.rb', line 43 def active? raise NotImplementedError.new("must be overridden") end |
#busy? ⇒ Boolean
Determines if queue is busy
Return
- active(Boolean)
-
true if queue is busy
60 61 62 |
# File 'lib/instance/bundle_queue.rb', line 60 def busy? raise NotImplementedError.new("must be overridden") end |
#clear ⇒ Object
Clear queue content
Return
- true
-
Always return true
79 80 81 |
# File 'lib/instance/bundle_queue.rb', line 79 def clear raise NotImplementedError.new("must be overridden") end |
#close ⇒ Object
Close queue so that further call to ‘push’ will be ignored
Return
- true
-
Always return true
87 88 89 |
# File 'lib/instance/bundle_queue.rb', line 87 def close raise NotImplementedError.new("must be overridden") end |
#push(context) ⇒ Object
Push new context to bundle queue and run next bundle
Parameters
- context(Object)
-
any supported kind of context
Return
- true
-
Always return true
71 72 73 |
# File 'lib/instance/bundle_queue.rb', line 71 def push(context) raise NotImplementedError.new("must be overridden") end |