Class: Gemfire::CacheServerNodeInstance
- Inherits:
-
Shared::NodeInstance
- Object
- Shared::Resource
- Shared::StateResource
- Shared::NodeInstance
- Gemfire::CacheServerNodeInstance
- Defined in:
- lib/vas/gemfire/cache_server_node_instances.rb
Overview
A cache server node instance
Instance Attribute Summary
Attributes inherited from Shared::NodeInstance
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#disk_stores ⇒ DiskStores
The instance’s disk stores.
-
#initialize(location, client) ⇒ CacheServerNodeInstance
constructor
A new instance of CacheServerNodeInstance.
-
#start(rebalance = false) ⇒ void
Starts the cache server node instance, optionally triggering a rebalance.
-
#statistics ⇒ Statistics
The instance’s statistics.
Methods inherited from Shared::NodeInstance
#group_instance, #live_configurations, #logs, #node, #to_s
Methods inherited from Shared::StateResource
Constructor Details
#initialize(location, client) ⇒ CacheServerNodeInstance
Returns a new instance of CacheServerNodeInstance.
33 34 35 36 37 38 39 40 |
# File 'lib/vas/gemfire/cache_server_node_instances.rb', line 33 def initialize(location, client) super(location, client, Node, CacheServerLogs, CacheServerInstance, 'cache-server-group-instance', CacheServerNodeLiveConfigurations) @disk_stores_location = Util::LinkUtils.get_link_href(details, 'disk-stores') @statistics_location = Util::LinkUtils.get_link_href(details, 'statistics') end |
Instance Method Details
#disk_stores ⇒ DiskStores
Returns the instance’s disk stores.
53 54 55 |
# File 'lib/vas/gemfire/cache_server_node_instances.rb', line 53 def disk_stores @disk_stores ||= DiskStores.new(@disk_stores_location, client) end |
#start(rebalance = false) ⇒ void
This method returns an undefined value.
Starts the cache server node instance, optionally triggering a rebalance
48 49 50 |
# File 'lib/vas/gemfire/cache_server_node_instances.rb', line 48 def start(rebalance = false) client.post(@state_location, { :status => 'STARTED', :rebalance => rebalance }) end |
#statistics ⇒ Statistics
Returns the instance’s statistics.
58 59 60 |
# File 'lib/vas/gemfire/cache_server_node_instances.rb', line 58 def statistics @statistics ||= Statistics.new(@statistics_location, client) end |