Class: Rinda::WaitTemplateEntry
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
TemplateEntry,
TupleEntry
|
|
Instance Chain:
self,
TemplateEntry,
TupleEntry,
DRbUndumped
|
|
Inherits: |
Rinda::TemplateEntry
|
Defined in: | lib/rinda/tuplespace.rb |
Overview
Documentation?
Class Method Summary
TupleEntry - Inherited
.new | Creates a TupleEntry based on |
Instance Attribute Summary
- #found readonly
TupleEntry - Inherited
#alive? | A TupleEntry is dead when it is canceled or expired. |
#canceled? | Returns the canceled status. |
#expired? | Has this tuple expired? (true/false). |
#expires |
Instance Method Summary
TemplateEntry - Inherited
#=== | Alias for TemplateEntry#match. |
#match | Matches this TemplateEntry against |
#make_tuple |
TupleEntry - Inherited
#[] | Retrieves |
#cancel | Marks this TupleEntry as canceled. |
#fetch | Fetches |
#make_expires |
|
#make_tuple | Creates a Tuple for |
#renew | Reset the expiry time according to |
#size | The size of the tuple. |
#value | Return the object which makes up the tuple itself: the Array or Hash. |
#get_renewer | Returns a valid argument to make_expires and the renewer or nil. |
Constructor Details
.new(place, ary, expires = nil) ⇒ WaitTemplateEntry
# File 'lib/rinda/tuplespace.rb', line 186
def initialize(place, ary, expires=nil) super(ary, expires) @place = place @cond = place.new_cond @found = nil end
Instance Attribute Details
#found (readonly)
[ GitHub ]# File 'lib/rinda/tuplespace.rb', line 184
attr_reader :found
Instance Method Details
#cancel
[ GitHub ]# File 'lib/rinda/tuplespace.rb', line 193
def cancel super signal end
#read(tuple)
[ GitHub ]# File 'lib/rinda/tuplespace.rb', line 202
def read(tuple) @found = tuple signal end
#signal
[ GitHub ]# File 'lib/rinda/tuplespace.rb', line 207
def signal @place.synchronize do @cond.signal end end
#wait
[ GitHub ]# File 'lib/rinda/tuplespace.rb', line 198
def wait @cond.wait end