Class Rinda::TupleEntry
In: lib/rinda/tuplespace.rb
Parent: Object

A TupleEntry is a Tuple (i.e. a possible entry in some Tuplespace) together with expiry and cancellation data.

Methods

[]   alive?   cancel   canceled?   expired?   fetch   make_expires   make_tuple   new   renew   size   value  

Included Modules

DRbUndumped

Attributes

expires  [RW] 

Public Class methods

Creates a TupleEntry based on ary with an optional renewer or expiry time sec.

A renewer must implement the renew method which returns a Numeric, nil, or true to indicate when the tuple has expired.

Public Instance methods

Retrieves key from the tuple.

A TupleEntry is dead when it is canceled or expired.

Marks this TupleEntry as canceled.

Returns the canceled status.

Has this tuple expired? (true/false).

A tuple has expired when its expiry timer based on the sec argument to initialize runs out.

Fetches key from the tuple.

Returns an expiry Time based on sec which can be one of:

Numeric:sec seconds into the future
true:the expiry time is the start of 1970 (i.e. expired)
nil:it is Tue Jan 19 03:14:07 GMT Standard Time 2038 (i.e. when UNIX clocks will die)

Creates a Rinda::Tuple for ary.

Reset the expiry time according to sec_or_renewer.

nil:it is set to expire in the far future.
false:it has expired.
Numeric:it will expire in that many seconds.

Otherwise the argument refers to some kind of renewer object which will reset its expiry time.

The size of the tuple.

Return the object which makes up the tuple itself: the Array or Hash.

[Validate]

ruby-doc.org is a service of James Britt and Neurogami, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.