Class: Baykit::BayServer::Common::RudderStateStore
- Inherits:
-
Util::ObjectStore
- Object
- Util::ObjectStore
- Baykit::BayServer::Common::RudderStateStore
- Defined in:
- lib/baykit/bayserver/common/rudder_state_store.rb
Defined Under Namespace
Classes: AgentListener
Class Attribute Summary collapse
-
.stores ⇒ Object
readonly
Agent id => InboundShipStore.
Attributes inherited from Util::ObjectStore
#active_list, #factory, #free_list
Class Method Summary collapse
- .get_store(agent_id) ⇒ Object
-
.init ⇒ Object
class methods.
Instance Method Summary collapse
-
#initialize ⇒ RudderStateStore
constructor
A new instance of RudderStateStore.
-
#print_usage(indent) ⇒ Object
print memory usage.
Methods inherited from Util::ObjectStore
Methods included from Util::Reusable
Constructor Details
#initialize ⇒ RudderStateStore
Returns a new instance of RudderStateStore.
34 35 36 37 |
# File 'lib/baykit/bayserver/common/rudder_state_store.rb', line 34 def initialize super @factory = -> { RudderState.new() } end |
Class Attribute Details
.stores ⇒ Object (readonly)
Agent id => InboundShipStore
29 30 31 |
# File 'lib/baykit/bayserver/common/rudder_state_store.rb', line 29 def stores @stores end |
Class Method Details
.get_store(agent_id) ⇒ Object
55 56 57 |
# File 'lib/baykit/bayserver/common/rudder_state_store.rb', line 55 def self.get_store(agent_id) return @stores[agent_id] end |
.init ⇒ Object
class methods
51 52 53 |
# File 'lib/baykit/bayserver/common/rudder_state_store.rb', line 51 def self.init() GrandAgent.add_lifecycle_listener(AgentListener.new()) end |
Instance Method Details
#print_usage(indent) ⇒ Object
print memory usage
42 43 44 45 |
# File 'lib/baykit/bayserver/common/rudder_state_store.rb', line 42 def print_usage(indent) BayLog.info("%sRudderStateStore Usage:", StringUtil.indent(indent)) super(indent+1) end |