Class: Rinda::SimpleRenewer

Inherits:
Object
  • Object
show all
Includes:
DRbUndumped
Defined in:
lib/rinda/rinda.rb

Overview

An SimpleRenewer allows a TupleSpace to check if a TupleEntry is still alive.

Instance Method Summary collapse

Constructor Details

#initialize(sec = 180) ⇒ SimpleRenewer

Creates a new SimpleRenewer that keeps an object alive for another sec seconds.


270
271
272
# File 'lib/rinda/rinda.rb', line 270

def initialize(sec=180)
  @sec = sec
end

Instance Method Details

#renewObject

Called by the TupleSpace to check if the object is still alive.


277
278
279
# File 'lib/rinda/rinda.rb', line 277

def renew
  @sec
end