Class: Gemfire::LocatorNodeInstance

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

Overview

A locator node instance

Instance Attribute Summary collapse

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

Methods inherited from Shared::StateResource

#start, #state, #stop

Constructor Details

#initialize(location, client) ⇒ LocatorNodeInstance

Returns a new instance of LocatorNodeInstance.



47
48
49
# File 'lib/vas/gemfire/locator_node_instances.rb', line 47

def initialize(location, client)
  super(location, client, Node, LocatorLogs, LocatorInstance, 'locator-group-instance', LocatorNodeLiveConfigurations)
end

Instance Attribute Details

#addressString? (readonly)

Returns the property in a node’s metadata used to determine the address of the network card on which the locator will listen. If nil the locator will listen on the address of the default network card.

Returns:

  • (String, nil)

    the property in a node’s metadata used to determine the address of the network card on which the locator will listen. If nil the locator will listen on the address of the default network card



35
36
37
# File 'lib/vas/gemfire/locator_node_instances.rb', line 35

def address
  @address
end

#peerBoolean (readonly)

Returns true if the locator will act as a peer, false if it will not.

Returns:

  • (Boolean)

    true if the locator will act as a peer, false if it will not



41
42
43
# File 'lib/vas/gemfire/locator_node_instances.rb', line 41

def peer
  @peer
end

#portInteger (readonly)

Returns the port that the locator will listen on.

Returns:

  • (Integer)

    the port that the locator will listen on



38
39
40
# File 'lib/vas/gemfire/locator_node_instances.rb', line 38

def port
  @port
end

#serverBoolean (readonly)

Returns true if the locator will act as a server, false if it will not.

Returns:

  • (Boolean)

    true if the locator will act as a server, false if it will not



44
45
46
# File 'lib/vas/gemfire/locator_node_instances.rb', line 44

def server
  @server
end

Instance Method Details

#reloadvoid

This method returns an undefined value.

Reloads the instance’s details from the server



53
54
55
56
57
58
59
# File 'lib/vas/gemfire/locator_node_instances.rb', line 53

def reload
  super
  @port = details['port']
  @peer = details['peer']
  @server = details['server']
  @address = details['address']
end

#to_sString

Returns a string representation of the instance.

Returns:

  • (String)

    a string representation of the instance



62
63
64
# File 'lib/vas/gemfire/locator_node_instances.rb', line 62

def to_s
  "#<#{self.class} name=#{name} address='#@address' port='#@port' peer='#@peer' server='#@server'>"
end