Class: Sqlfire::Node

Inherits:
Shared::GroupableNode show all
Defined in:
lib/vas/sqlfire/nodes.rb

Overview

A GemFire node

Instance Attribute Summary collapse

Attributes inherited from Shared::Node

#agent_home, #architecture, #host_names, #ip_addresses, #ipv4_addresses, #ipv6_addresses, #metadata, #operating_system

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::GroupableNode

#groups

Methods inherited from Shared::Node

#update

Constructor Details

#initialize(location, client) ⇒ Node

Returns a new instance of Node.



36
37
38
39
40
41
42
# File 'lib/vas/sqlfire/nodes.rb', line 36

def initialize(location, client)
  super(location, client, Group)

  @agent_instances_location = Util::LinkUtils.get_link_href(details, 'agent-node-instances')
  @locator_instances_location = Util::LinkUtils.get_link_href(details, 'locator-node-instances')
  @server_instances_location = Util::LinkUtils.get_link_href(details, 'server-node-instances')
end

Instance Attribute Details

#java_homeString (readonly)

Returns the Node’s Java home.

Returns:

  • (String)

    the Node’s Java home



33
34
35
# File 'lib/vas/sqlfire/nodes.rb', line 33

def java_home
  @java_home
end

Instance Method Details

#agent_instancesAgentNodeInstances

Returns the node’s agent instances.

Returns:



52
53
54
# File 'lib/vas/sqlfire/nodes.rb', line 52

def agent_instances
  @agent_instances ||= AgentNodeInstances.new(@agent_instances_location, client)
end

#locator_instancesLocatorNodeInstances

Returns the node’s locator instances.

Returns:



57
58
59
# File 'lib/vas/sqlfire/nodes.rb', line 57

def locator_instances
  @locator_instances ||= LocatorNodeInstances.new(@locator_instances_location, client)
end

#reloadvoid

This method returns an undefined value.

Reloads the node’s details from the server



46
47
48
49
# File 'lib/vas/sqlfire/nodes.rb', line 46

def reload
  super
  @java_home = details['java-home']
end

#server_instancesServerNodeInstances

Returns the node’s server instances.

Returns:



62
63
64
# File 'lib/vas/sqlfire/nodes.rb', line 62

def server_instances
  @server_instances ||= ServerNodeInstances.new(@server_instances_location, client)
end

#to_sString

Returns a string representation of the node.

Returns:

  • (String)

    a string representation of the node



67
68
69
# File 'lib/vas/sqlfire/nodes.rb', line 67

def to_s
  "#<#{self.class} host_names='#{host_names}' ip_addresses='#{ip_addresses}' ipv4_addresses='#{ipv4_addresses}' ipv6_addresses='#{ipv6_addresses}' operating_system='#{operating_system}' architecture='#{architecture}' agent_home='#{agent_home}' java_home='#@java_home' metadata='#{}'>"
end