Class: DRb::GW

Inherits:
Object
  • Object
show all
Includes:
MonitorMixin
Defined in:
lib/drb/gw.rb

Overview

The GW provides a synchronized store for participants in the gateway to communicate.

Instance Method Summary collapse

Constructor Details

#initializeGW

Creates a new GW



50
51
52
53
# File 'lib/drb/gw.rb', line 50

def initialize
  super()
  @hash = {}
end

Instance Method Details

#[](key) ⇒ Object

Retrieves key from the GW



57
58
59
60
61
# File 'lib/drb/gw.rb', line 57

def [](key)
  synchronize do
    @hash[key]
  end
end

#[]=(key, v) ⇒ Object

Stores value v at key in the GW



65
66
67
68
69
# File 'lib/drb/gw.rb', line 65

def []=(key, v)
  synchronize do
    @hash[key] = v
  end
end