Rinda::TupleSpaceProxy
class Rinda::TupleSpaceProxy
Parent:Object
TupleSpaceProxy允许远程元组空间显示为本地。
公共类方法
new(ts)显示源
创建一个新的TupleSpaceProxy进行换行ts
。
# File lib/rinda/rinda.rb, line 257
def initialize(ts)
@ts = ts
end
公共实例方法
notify(ev, tuple, sec=nil) 显示源
ev
在代理TupleSpace上注册事件通知。请参阅Rinda :: TupleSpace#notify
# File lib/rinda/rinda.rb, line 296
def notify(ev, tuple, sec=nil)
@ts.notify(ev, tuple, sec)
end
read(tuple, sec=nil, &block) 显示源
tuple
从代理TupleSpace 读取。请参阅Rinda :: TupleSpace#阅读。
# File lib/rinda/rinda.rb, line 280
def read(tuple, sec=nil, &block)
@ts.read(tuple, sec, &block)
end
read_all(tuple) 显示源
读取tuple
与代理元组空间相匹配的所有元组。请参阅Rinda :: TupleSpace#read_all。
# File lib/rinda/rinda.rb, line 288
def read_all(tuple)
@ts.read_all(tuple)
end
take(tuple, sec=nil, &block) 显示源
采取tuple
代理TupleSpace。参见Rinda :: TupleSpace#take。
# File lib/rinda/rinda.rb, line 271
def take(tuple, sec=nil, &block)
Port.deliver do |port|
@ts.move(DRbObject.new(port), tuple, sec, &block)
end
end
write(tuple, sec=nil)显示源
添加tuple
到代理TupleSpace。请参阅Rinda :: TupleSpace#写入。
# File lib/rinda/rinda.rb, line 264
def write(tuple, sec=nil)
@ts.write(tuple, sec)
end