A TupleEntry
is a Tuple
(i.e. a possible entry in some Tuplespace) together with expiry and cancellation data.
- #
- A
- C
- E
- F
- M
- N
- R
- S
- V
Attributes
[RW] | expires |
Class Public methods
new(ary, sec=nil) Link
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.
Instance Public methods
[](key) Link
Retrieves key
from the tuple.
alive?() Link
A TupleEntry
is dead when it is canceled or expired.
cancel() Link
Marks this TupleEntry
as canceled.
canceled?() Link
Returns the canceled status.
expired?() Link
Has this tuple expired? (true/false).
A tuple has expired when its expiry timer based on the sec
argument to initialize runs out.
fetch(key) Link
Fetches key
from the tuple.
make_tuple(ary) Link
Creates a Rinda::Tuple
for ary
.
renew(sec_or_renewer) Link
Reset the expiry time according to sec_or_renewer
.
nil
-
it is set to expire in the far future.
true
-
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.
size() Link
The size of the tuple.