Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > rinda/tuplespaceライブラリ > Rinda::TupleEntryクラス

class Rinda::TupleEntry

クラスの継承リスト: Rinda::TupleEntry < DRb::DRbUndumped < Object < Kernel < BasicObject

要約

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

特異メソッド

new(ary, sec = nil)

[TODO]

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.

インスタンスメソッド

self[key]

[TODO]

Retrieves key from the tuple.

alive?

[TODO]

A TupleEntry is dead when it is canceled or expired.

cancel

[TODO]

Marks this TupleEntry as canceled.

canceled?

[TODO]

Returns the canceled status.

expired?

[TODO]

Has this tuple expired? (true/false).

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

expires

[TODO]

expires=(expires)

[TODO]

fetch(key)

[TODO]

Fetches key from the tuple.

make_expires(sec = nil)

[TODO]

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)
make_tuple(ary)

[TODO]

Creates a Rinda::Tuple for +ary+.

renew(sec_or_renewer)

[TODO]

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.

size

[TODO]

The size of the tuple.

value

[TODO]

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

class Rinda::TupleEntry