Class: JrubyWhirr::ClusterController
- Inherits:
-
Object
- Object
- JrubyWhirr::ClusterController
- Defined in:
- lib/jruby_whirr/cluster_controller.rb
Instance Attribute Summary collapse
-
#cluster ⇒ Object
Returns the value of attribute cluster.
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#spec ⇒ Object
Returns the value of attribute spec.
Instance Method Summary collapse
- #destroy_cluster(spec) ⇒ Object
-
#initialize(cluster_spec) ⇒ ClusterController
constructor
A new instance of ClusterController.
- #launch_cluster ⇒ Object
Constructor Details
#initialize(cluster_spec) ⇒ ClusterController
Returns a new instance of ClusterController.
12 13 14 15 16 |
# File 'lib/jruby_whirr/cluster_controller.rb', line 12 def initialize (cluster_spec) @spec = cluster_spec factory = ClusterControllerFactory.new; @controller = factory.create(cluster_spec.get_service_name) end |
Instance Attribute Details
#cluster ⇒ Object
Returns the value of attribute cluster.
10 11 12 |
# File 'lib/jruby_whirr/cluster_controller.rb', line 10 def cluster @cluster end |
#controller ⇒ Object
Returns the value of attribute controller.
10 11 12 |
# File 'lib/jruby_whirr/cluster_controller.rb', line 10 def controller @controller end |
#spec ⇒ Object
Returns the value of attribute spec.
10 11 12 |
# File 'lib/jruby_whirr/cluster_controller.rb', line 10 def spec @spec end |
Instance Method Details
#destroy_cluster(spec) ⇒ Object
22 23 24 |
# File 'lib/jruby_whirr/cluster_controller.rb', line 22 def destroy_cluster(spec) @controller.destroyCluster(spec) end |
#launch_cluster ⇒ Object
18 19 20 |
# File 'lib/jruby_whirr/cluster_controller.rb', line 18 def launch_cluster() @cluster = @controller.launchCluster(@spec.cluster_spec) end |