123456789_123456789_123456789_123456789_123456789_

Class: Rinda::TemplateEntry

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, TupleEntry
Instance Chain:
self, TupleEntry, DRbUndumped
Inherits: Rinda::TupleEntry
Defined in: lib/rinda/tuplespace.rb

Overview

A TemplateEntry is a Template together with expiry and cancellation data.

Class Method Summary

TupleEntry - Inherited

.new

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

Instance Attribute Summary

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

TupleEntry - Inherited

#[]

Retrieves key from the tuple.

#cancel

Marks this TupleEntry as canceled.

#fetch

Fetches key from the tuple.

#make_expires
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.

#make_tuple

Creates a Tuple for ary.

#renew

Reset the expiry time according to sec_or_renewer.

#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

This class inherits a constructor from Rinda::TupleEntry

Instance Method Details

#===(tuple)

Alias for #match.

[ GitHub ]

  
# File 'lib/rinda/tuplespace.rb', line 171

alias === match

#make_tuple(ary)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rinda/tuplespace.rb', line 173

def make_tuple(ary) # :nodoc:
  Rinda::Template.new(ary)
end

#match(tuple) Also known as: #===

Matches this TemplateEntry against tuple. See Template#match for details on how a Template matches a Tuple.

[ GitHub ]

  
# File 'lib/rinda/tuplespace.rb', line 167

def match(tuple)
  @tuple.match(tuple)
end