Class: Gemfire::CacheServerInstance
- Inherits:
-
Shared::Instance
- Object
- Shared::Resource
- Shared::StateResource
- Shared::Instance
- Gemfire::CacheServerInstance
- Defined in:
- lib/vas/gemfire/cache_server_instances.rb
Overview
A cache server instance
Instance Attribute Summary
Attributes inherited from Shared::Instance
Attributes included from Shared::Deletable
Attributes inherited from Shared::Resource
Instance Method Summary collapse
-
#initialize(location, client) ⇒ CacheServerInstance
constructor
A new instance of CacheServerInstance.
-
#live_application_code ⇒ LiveApplicationCodes
The instance’s live application code.
-
#pending_application_code ⇒ PendingApplicationCodes
The instance’s pending application code.
-
#update(installation) ⇒ void
Updates the instance to use a different installation.
Methods inherited from Shared::Instance
#group, #installation, #live_configurations, #node_instances, #pending_configurations, #reload, #start, #stop, #to_s
Methods included from Shared::Deletable
Methods inherited from Shared::StateResource
Constructor Details
#initialize(location, client) ⇒ CacheServerInstance
Returns a new instance of CacheServerInstance.
44 45 46 47 48 49 50 51 |
# File 'lib/vas/gemfire/cache_server_instances.rb', line 44 def initialize(location, client) super(location, client, Group, Installation, CacheServerLiveConfigurations, CacheServerPendingConfigurations, CacheServerNodeInstance, 'cache-server-node-instance') @live_application_code_location = Util::LinkUtils.get_link_href(details, 'live-application-code') @pending_application_code_location = Util::LinkUtils.get_link_href(details, 'pending-application-code') end |
Instance Method Details
#live_application_code ⇒ LiveApplicationCodes
Returns the instance’s live application code.
64 65 66 |
# File 'lib/vas/gemfire/cache_server_instances.rb', line 64 def live_application_code @live_application_code ||= LiveApplicationCodes.new(@live_application_code_location, client) end |
#pending_application_code ⇒ PendingApplicationCodes
Returns the instance’s pending application code.
69 70 71 |
# File 'lib/vas/gemfire/cache_server_instances.rb', line 69 def pending_application_code @pending_application_code ||= PendingApplicationCodes.new(@pending_application_code_location, client) end |
#update(installation) ⇒ void
This method returns an undefined value.
Updates the instance to use a different installation
58 59 60 61 |
# File 'lib/vas/gemfire/cache_server_instances.rb', line 58 def update(installation) client.post(location, { :installation => installation.location }) reload end |