Class
TupleSpaceProxy
allows a remote Tuplespace to appear as local.
Class Methods
::
lib/rinda/rinda.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rinda/rinda.rb, line 258
def initialize(ts)
@ts = ts
end
Creates a new TupleSpaceProxy
to wrap ts
.
Instance Methods
lib/rinda/rinda.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rinda/rinda.rb, line 297
def notify(ev, tuple, sec=nil)
@ts.notify(ev, tuple, sec)
end
Registers for notifications of event ev
on the proxied TupleSpace
. See TupleSpace#notify
lib/rinda/rinda.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rinda/rinda.rb, line 281
def read(tuple, sec=nil, &block)
@ts.read(tuple, sec, &block)
end
Reads tuple
from the proxied TupleSpace
. See TupleSpace#read
.
lib/rinda/rinda.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rinda/rinda.rb, line 289
def read_all(tuple)
@ts.read_all(tuple)
end
Reads all tuples matching tuple
from the proxied TupleSpace
. See TupleSpace#read_all
.
lib/rinda/rinda.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rinda/rinda.rb, line 272
def take(tuple, sec=nil, &block)
Port.deliver do |port|
@ts.move(DRbObject.new(port), tuple, sec, &block)
end
end
Takes tuple
from the proxied TupleSpace
. See TupleSpace#take
.
lib/rinda/rinda.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rinda/rinda.rb, line 265
def write(tuple, sec=nil)
@ts.write(tuple, sec)
end
Adds tuple
to the proxied TupleSpace
. See TupleSpace#write
.