Class: Baykit::BayServer::Common::InboundShipStore

Inherits:
Util::ObjectStore show all
Includes:
Agent, Util
Defined in:
lib/baykit/bayserver/common/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

Methods included from Util::Reusable

#reset

Constructor Details

#initializeInboundShipStore

Returns a new instance of InboundShipStore.



35
36
37
38
# File 'lib/baykit/bayserver/common/inbound_ship_store.rb', line 35

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

Class Attribute Details

.storesObject (readonly)

Agent id => InboundShipStore



31
32
33
# File 'lib/baykit/bayserver/common/inbound_ship_store.rb', line 31

def stores
  @stores
end

Class Method Details

.get_store(agent_id) ⇒ Object



56
57
58
# File 'lib/baykit/bayserver/common/inbound_ship_store.rb', line 56

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

.initObject

class methods



52
53
54
# File 'lib/baykit/bayserver/common/inbound_ship_store.rb', line 52

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

Instance Method Details

print memory usage



43
44
45
46
# File 'lib/baykit/bayserver/common/inbound_ship_store.rb', line 43

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