класс Rinda::TupleSpaceProxy
TupleSpaceProxy позволяет удалённому Tuplespace отображаться как локальный.
Публичные методы класса
# File lib/rinda/rinda.rb, line 258 def initialize(ts) @ts = ts end
Создаёт новый TupleSpaceProxy для обертывания ts.
Публичные методы экземпляра
# File lib/rinda/rinda.rb, line 297 def notify(ev, tuple, sec=nil) @ts.notify(ev, tuple, sec) end
Регистрирует уведомления о событии ev в прокси-объекте TupleSpace. См. Rinda::TupleSpace#notify
# File lib/rinda/rinda.rb, line 281 def read(tuple, sec=nil, &block) @ts.read(tuple, sec, &block) end
Читает tuple из прокси-объекта TupleSpace. См. Rinda::TupleSpace#read.
# File lib/rinda/rinda.rb, line 289 def read_all(tuple) @ts.read_all(tuple) end
Читает все кортежи, соответствующие tuple из прокси-объекта TupleSpace. См. Rinda::TupleSpace#read_all.
# File 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 Извлекает tuple из прокси-объекта TupleSpace. См. Rinda::TupleSpace#take.
# File lib/rinda/rinda.rb, line 265 def write(tuple, sec=nil) @ts.write(tuple, sec) end
Добавляет tuple в прокси-объект TupleSpace. См. Rinda::TupleSpace#write.
Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.