class DCell::Registry::HazelcastAdapter::GlobalRegistry

Public Class Methods

new(hazelcast) click to toggle source
# File lib/dcell/registries/hazelcast_adapter.rb, line 60
def initialize(hazelcast)
  @map = hazelcast.get_map('globals')
end

Public Instance Methods

clear() click to toggle source
# File lib/dcell/registries/hazelcast_adapter.rb, line 78
def clear
  @map.clear
end
get(key) click to toggle source
# File lib/dcell/registries/hazelcast_adapter.rb, line 64
def get(key)
  string = @map.get(key.to_s)
  Marshal.load(string) if string
end
global_keys() click to toggle source
# File lib/dcell/registries/hazelcast_adapter.rb, line 74
def global_keys
  @map.key_set.to_a
end
set(key, value) click to toggle source
# File lib/dcell/registries/hazelcast_adapter.rb, line 69
def set(key, value)
  string = Marshal.dump(value)
  @map.put(key.to_s, string)
end