123456789_123456789_123456789_123456789_123456789_

Class: Rinda::SimpleRenewer

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
self, DRbUndumped
Inherits: Object
Defined in: lib/rinda/rinda.rb

Overview

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

Class Method Summary

Instance Method Summary

Constructor Details

.new(sec = 180) ⇒ SimpleRenewer

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

[ GitHub ]

  
# File 'lib/rinda/rinda.rb', line 315

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

Instance Method Details

#renew

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

[ GitHub ]

  
# File 'lib/rinda/rinda.rb', line 322

def renew
  @sec
end