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, #node_instances, #pending_configurations

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Methods inherited from Shared::Instance

#installation, #to_s

Methods inherited from Shared::StateResource

#start, #state, #stop

Constructor Details

#initialize(location, client) ⇒ CacheServerInstance

:nodoc:



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

def initialize(location, client) #:nodoc:
  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_codeObject (readonly)

The instance’s live application code



39
40
41
# File 'lib/vas/gemfire/cache_server_instances.rb', line 39

def live_application_code
  @live_application_code
end

#pending_application_codeObject (readonly)

The instance’s pending application code



42
43
44
# File 'lib/vas/gemfire/cache_server_instances.rb', line 42

def pending_application_code
  @pending_application_code
end

Instance Method Details

#update(installation) ⇒ Object

Updates the instance to use the given installation



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

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