Class: Rinda::TupleSpaceProxy
| Relationships & Source Files | |
| Namespace Children | |
| Classes: | |
| Inherits: | Object | 
| Defined in: | lib/rinda/rinda.rb | 
Overview
TupleSpaceProxy allows a remote Tuplespace to appear as local.
Class Method Summary
- 
    
      .new(ts)  ⇒ TupleSpaceProxy 
    
    constructor
    Creates a new TupleSpaceProxyto wrapts.
Instance Method Summary
- 
    
      #notify(ev, tuple, sec = nil)  
    
    Registers for notifications of event evon the proxiedTupleSpace.
- 
    
      #read(tuple, sec = nil, &block)  
    
    Reads tuplefrom the proxiedTupleSpace.
- 
    
      #read_all(tuple)  
    
    Reads all tuples matching tuplefrom the proxiedTupleSpace.
- 
    
      #take(tuple, sec = nil, &block)  
    
    Takes tuplefrom the proxiedTupleSpace.
- 
    
      #write(tuple, sec = nil)  
    
    Adds tupleto the proxiedTupleSpace.
Constructor Details
    .new(ts)  ⇒ TupleSpaceProxy 
  
Creates a new TupleSpaceProxy to wrap ts.
# File 'lib/rinda/rinda.rb', line 259
def initialize(ts) @ts = ts end
Instance Method Details
#notify(ev, tuple, sec = nil)
Registers for notifications of event ev on the proxied TupleSpace. See TupleSpace#notify
# File 'lib/rinda/rinda.rb', line 298
def notify(ev, tuple, sec=nil) @ts.notify(ev, tuple, sec) end
#read(tuple, sec = nil, &block)
Reads tuple from the proxied TupleSpace.  See TupleSpace#read.
# File 'lib/rinda/rinda.rb', line 282
def read(tuple, sec=nil, &block) @ts.read(tuple, sec, &block) end
#read_all(tuple)
Reads all tuples matching tuple from the proxied TupleSpace.  See TupleSpace#read_all.
# File 'lib/rinda/rinda.rb', line 290
def read_all(tuple) @ts.read_all(tuple) end
#take(tuple, sec = nil, &block)
Takes tuple from the proxied TupleSpace.  See TupleSpace#take.
#write(tuple, sec = nil)
Adds tuple to the proxied TupleSpace.  See TupleSpace#write.
# File 'lib/rinda/rinda.rb', line 266
def write(tuple, sec=nil) @ts.write(tuple, sec) end