On this page
class Rinda::TupleSpaceProxy
TupleSpaceProxy allows a remote Tuplespace to appear as local.
Public Class Methods
# File lib/rinda/rinda.rb, line 256
def initialize(ts)
@ts = ts
end
Creates a new TupleSpaceProxy to wrap ts
.
Public Instance Methods
# File lib/rinda/rinda.rb, line 295
def notify(ev, tuple, sec=nil)
@ts.notify(ev, tuple, sec)
end
Registers for notifications of event ev
on the proxied TupleSpace. See Rinda::TupleSpace#notify
# File lib/rinda/rinda.rb, line 279
def read(tuple, sec=nil, &block)
@ts.read(tuple, sec, &block)
end
Reads tuple
from the proxied TupleSpace. See Rinda::TupleSpace#read.
# File lib/rinda/rinda.rb, line 287
def read_all(tuple)
@ts.read_all(tuple)
end
Reads all tuples matching tuple
from the proxied TupleSpace. See Rinda::TupleSpace#read_all.
# File lib/rinda/rinda.rb, line 270
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 Rinda::TupleSpace#take.
# File lib/rinda/rinda.rb, line 263
def write(tuple, sec=nil)
@ts.write(tuple, sec)
end
Adds tuple
to the proxied TupleSpace. See Rinda::TupleSpace#write.
Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.