Class: Gemfire::CacheServerNodeInstance

Inherits:
Shared::NodeInstance show all
Defined in:
lib/vas/gemfire/cache_server_node_instances.rb

Overview

A cache server node instance

Instance Attribute Summary

Attributes inherited from Shared::NodeInstance

#name

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::NodeInstance

#group_instance, #live_configurations, #logs, #node, #to_s

Methods inherited from Shared::StateResource

#state, #stop

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_storesDiskStores

Returns the instance’s disk stores.

Returns:



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

Parameters:

  • rebalance (Boolean) (defaults to: false)

    true if the start should trigger a rebalance, false if it should not



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

#statisticsStatistics

Returns the instance’s statistics.

Returns:



58
59
60
# File 'lib/vas/gemfire/cache_server_node_instances.rb', line 58

def statistics
  @statistics ||= Statistics.new(@statistics_location, client)
end