Class: Sqlfire::LocatorNodeInstance
- Inherits:
-
Shared::NodeInstance
- Object
- Shared::Resource
- Shared::StateResource
- Shared::NodeInstance
- Sqlfire::LocatorNodeInstance
- Defined in:
- lib/vas/sqlfire/locator_node_instances.rb
Overview
A locator node instance
Instance Attribute Summary collapse
-
#bind_address ⇒ String
readonly
The property in a node’s metadata used to determine the address that the locator binds to for peer-to-peer communication.
-
#client_bind_address ⇒ String
readonly
The property in a node’s metadata used to determine the address that the locator binds to for client communication.
-
#client_port ⇒ Integer
readonly
run_netserver
istrue
. -
#initial_heap ⇒ String
readonly
The initial heap size of the locator’s JVM.
-
#jvm_options ⇒ String[]
readonly
The JVM options that are passed to the locator’s JVM when it is started.
-
#max_heap ⇒ String
readonly
The max heap size of the locator’s JVM.
-
#peer_discovery_address ⇒ String
readonly
The property in a node’s metadata used to determine the address that the locator binds to for peer-discovery communication.
-
#peer_discovery_port ⇒ Integer
readonly
The port that the locator listens of for peer-discovery connections.
-
#run_netserver ⇒ Boolean
readonly
true
if the locator runs a netserver that can service thin clients, otherwisefalse
.
Attributes inherited from Shared::NodeInstance
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ LocatorNodeInstance
constructor
A new instance of LocatorNodeInstance.
- #reload ⇒ Object
-
#to_s ⇒ String
A string representation of the instance.
Methods inherited from Shared::NodeInstance
#group_instance, #live_configurations, #logs, #node
Methods inherited from Shared::StateResource
Constructor Details
#initialize(location, client) ⇒ LocatorNodeInstance
Returns a new instance of LocatorNodeInstance.
66 67 68 69 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 66 def initialize(location, client) super(location, client, Node, LocatorLogs, LocatorInstance, 'locator-group-instance', LocatorNodeLiveConfigurations) end |
Instance Attribute Details
#bind_address ⇒ String (readonly)
Returns the property in a node’s metadata used to determine the address that the locator binds to for peer-to-peer communication. If nil
, the locator uses the value derived from peer_discovery_address
.
34 35 36 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 34 def bind_address @bind_address end |
#client_bind_address ⇒ String (readonly)
Returns the property in a node’s metadata used to determine the address that the locator binds to for client communication. If nil
, the locator uses the node’s hostname. Only takes effect if run_netserver
is true
.
39 40 41 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 39 def client_bind_address @client_bind_address end |
#client_port ⇒ Integer (readonly)
run_netserver
is true
43 44 45 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 43 def client_port @client_port end |
#initial_heap ⇒ String (readonly)
Returns The initial heap size of the locator’s JVM. nil
if the default is used.
46 47 48 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 46 def initial_heap @initial_heap end |
#jvm_options ⇒ String[] (readonly)
Returns The JVM options that are passed to the locator’s JVM when it is started.
49 50 51 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 49 def @jvm_options end |
#max_heap ⇒ String (readonly)
Returns The max heap size of the locator’s JVM. nil
if the default is used.
52 53 54 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 52 def max_heap @max_heap end |
#peer_discovery_address ⇒ String (readonly)
Returns the property in a node’s metadata used to determine the address that the locator binds to for peer-discovery communication. If nil
, the locator uses 0.0.0.0
.
56 57 58 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 56 def peer_discovery_address @peer_discovery_address end |
#peer_discovery_port ⇒ Integer (readonly)
Returns The port that the locator listens of for peer-discovery connections.
60 61 62 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 60 def peer_discovery_port @peer_discovery_port end |
#run_netserver ⇒ Boolean (readonly)
Returns true
if the locator runs a netserver that can service thin clients, otherwise false
.
63 64 65 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 63 def run_netserver @run_netserver end |
Instance Method Details
#reload ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 71 def reload super @bind_address = details['bind-address'] @client_bind_address = details['client-bind-address'] @client_port = details['client-port'] @initial_heap = details['initial-heap'] @jvm_options = details['jvm-options'] @max_heap = details['max-heap'] @peer_discovery_address = details['peer-discovery-address'] @peer_discovery_port = details['peer-discovery-port'] @run_netserver = details['run-netserver'] end |
#to_s ⇒ String
Returns a string representation of the instance.
85 86 87 |
# File 'lib/vas/sqlfire/locator_node_instances.rb', line 85 def to_s "#<#{self.class} name='#{name}' bind_address='#@bind_address' client_bind_address='#@client_bind_address' client_port='#@client_port' initial_heap='#@initial_heap' jvm_options='#@jvm_options' max_heap='#@max_heap' peer_discovery_address='#@peer_discovery_address' peer_discovery_port='#@peer_discovery_port' run_netserver='#@run_netserver'>" end |