класс Rinda::TupleSpaceProxy
TupleSpaceProxy позволяет удаленному Tuplespace отображаться как локальный.
Публичные методы класса
# File lib/rinda/rinda.rb, line 259 def initialize(ts) @ts = ts end
Создает новый TupleSpaceProxy для обертывания ts.
Публичные методы экземпляра
# File lib/rinda/rinda.rb, line 298 def notify(ev, tuple, sec=nil) @ts.notify(ev, tuple, sec) end
Регистрируется для уведомлений об событии ev на проксированном TupleSpace. Смотрите TupleSpace#notify
# File lib/rinda/rinda.rb, line 282 def read(tuple, sec=nil, &block) @ts.read(tuple, sec, &block) end
Читает tuple из проксированного TupleSpace. Смотрите TupleSpace#read.
# File lib/rinda/rinda.rb, line 290 def read_all(tuple) @ts.read_all(tuple) end
Читает все кортежи, соответствующие tuple из проксированного TupleSpace. Смотрите TupleSpace#read_all.
# File lib/rinda/rinda.rb, line 273
def take(tuple, sec=nil, &block)
Port.deliver do |port|
@ts.move(DRbObject.new(port), tuple, sec, &block)
end
end Берет tuple из проксированного TupleSpace. Смотрите TupleSpace#take.
# File lib/rinda/rinda.rb, line 266 def write(tuple, sec=nil) @ts.write(tuple, sec) end
Добавляет tuple в проксированный TupleSpace. Смотрите TupleSpace#write.
Ruby Core © 1993–2022 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.