Class: ExcADG::VTimeout
- Inherits:
-
Object
- Object
- ExcADG::VTimeout
- Defined in:
- lib/excadg/vtimeout.rb
Overview
complex vertex timeout to carry fine-grained timeouts
Instance Attribute Summary collapse
-
#deps ⇒ Object
readonly
Returns the value of attribute deps.
-
#global ⇒ Object
readonly
Returns the value of attribute global.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
-
#initialize(payload: nil, deps: nil, global: nil) ⇒ VTimeout
constructor
A new instance of VTimeout.
Constructor Details
#initialize(payload: nil, deps: nil, global: nil) ⇒ VTimeout
Returns a new instance of VTimeout.
11 12 13 14 15 16 17 18 19 |
# File 'lib/excadg/vtimeout.rb', line 11 def initialize payload: nil, deps: nil, global: nil if !global.nil? && global < (deps || 0) + (payload || 0) && (global < deps + payload) raise "global timeout (#{global}) is less than sum of deps (#{deps}) and payload (#{payload}) timeouts" end @global = global @deps = deps @payload = payload end |
Instance Attribute Details
#deps ⇒ Object (readonly)
Returns the value of attribute deps.
6 7 8 |
# File 'lib/excadg/vtimeout.rb', line 6 def deps @deps end |
#global ⇒ Object (readonly)
Returns the value of attribute global.
6 7 8 |
# File 'lib/excadg/vtimeout.rb', line 6 def global @global end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
6 7 8 |
# File 'lib/excadg/vtimeout.rb', line 6 def payload @payload end |