Class: Baykit::BayServer::Docker::Base::InboundShipStore

Inherits:
Util::ObjectStore show all
Includes:
Agent, Util, WaterCraft
Defined in:
lib/baykit/bayserver/docker/base/inbound_ship_store.rb

Defined Under Namespace

Classes: AgentListener

Class Attribute Summary collapse

Attributes inherited from Util::ObjectStore

#active_list, #factory, #free_list

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Util::ObjectStore

#Return, #rent, #reset

Constructor Details

#initializeInboundShipStore

Returns a new instance of InboundShipStore.



36
37
38
39
# File 'lib/baykit/bayserver/docker/base/inbound_ship_store.rb', line 36

def initialize()
  super
  @factory = -> { InboundShip.new() }
end

Class Attribute Details

.storesObject (readonly)

Agent id => InboundShipStore



32
33
34
# File 'lib/baykit/bayserver/docker/base/inbound_ship_store.rb', line 32

def stores
  @stores
end

Class Method Details

.get_store(agent_id) ⇒ Object



57
58
59
# File 'lib/baykit/bayserver/docker/base/inbound_ship_store.rb', line 57

def self.get_store(agent_id)
  return @stores[agent_id]
end

.initObject

class methods



53
54
55
# File 'lib/baykit/bayserver/docker/base/inbound_ship_store.rb', line 53

def self.init()
  GrandAgent.add_lifecycle_listener(AgentListener.new())
end

Instance Method Details

print memory usage



44
45
46
47
# File 'lib/baykit/bayserver/docker/base/inbound_ship_store.rb', line 44

def print_usage(indent)
  BayLog.info("%sInboundShipStore Usage:", StringUtil.indent(indent));
  super(indent+1);
end