Class: Gemfire::CacheServerInstance

Inherits:
Shared::Instance show all
Defined in:
lib/vas/gemfire/cache_server_instances.rb

Overview

A cache server instance

Instance Attribute Summary collapse

Attributes inherited from Shared::Instance

#group, #live_configurations, #name, #pending_configurations

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::Instance

#installation, #node_instances, #to_s

Methods inherited from Shared::StateResource

#start, #state, #stop

Constructor Details

#initialize(location, client) ⇒ CacheServerInstance

Returns a new instance of CacheServerInstance.



50
51
52
53
54
# File 'lib/vas/gemfire/cache_server_instances.rb', line 50

def initialize(location, client)
  super(location, client, Group, Installation, CacheServerLiveConfigurations, CacheServerPendingConfigurations, CacheServerNodeInstance, 'cache-server-node-instance')
  @live_application_code = LiveApplicationCodes.new(Util::LinkUtils.get_link_href(details, 'live-application-code'), client)
  @pending_application_code = PendingApplicationCodes.new(Util::LinkUtils.get_link_href(details, 'pending-application-code'), client)
end

Instance Attribute Details

#live_application_codeLiveApplicationCodes (readonly)

Returns the instance’s live application code.

Returns:



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

def live_application_code
  @live_application_code
end

#pending_application_codePendingApplicationCodes (readonly)

Returns the instance’s pending application code.

Returns:



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

def pending_application_code
  @pending_application_code
end

Instance Method Details

#update(installation) ⇒ void

This method returns an undefined value.

Updates the instance to use a different installation

Parameters:

  • installation (Installation)

    the installation that the instance should use



61
62
63
# File 'lib/vas/gemfire/cache_server_instances.rb', line 61

def update(installation)
  client.post(location, { :installation => installation.location });
end