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



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

def initialize
  super()
  @hash = {}
end

Instance Method Details

#[](key) ⇒ Object

Retrieves key from the GW



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

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

#[]=(key, v) ⇒ Object

Stores value v at key in the GW



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

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