Class: Velocity::Instance::SearchCollection::CollectionService
- Defined in:
- lib/acceleration/velocity.rb
Overview
A model for the collections’ services
Instance Attribute Summary collapse
-
#collection ⇒ Object
The collection being controlled.
Attributes inherited from APIModel
Instance Method Summary collapse
-
#initialize(collection) ⇒ CollectionService
constructor
Create a new wrapper for collection services for the given collection.
-
#restart(options = {}) ⇒ Object
Restart the service.
-
#start(options = {}) ⇒ Object
Start the service.
-
#stop(options = {}) ⇒ Object
Stop the service.
Methods inherited from APIModel
#method_missing, #resolve, #respond_to_missing?
Constructor Details
#initialize(collection) ⇒ CollectionService
Create a new wrapper for collection services for the given collection.
952 953 954 |
# File 'lib/acceleration/velocity.rb', line 952 def initialize(collection) @collection = collection end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Velocity::Instance::APIModel
Instance Attribute Details
#collection ⇒ Object
The collection being controlled
946 947 948 |
# File 'lib/acceleration/velocity.rb', line 946 def collection @collection end |
Instance Method Details
#restart(options = {}) ⇒ Object
Restart the service
Valid options for either service are:
-
:subcollection => ‘live’ (default) or ‘staging’
991 992 993 |
# File 'lib/acceleration/velocity.rb', line 991 def restart( = {}) act 'restart', end |
#start(options = {}) ⇒ Object
Start the service.
Valid option for either service is:
-
:subcollection => ‘live’ (default) or ‘staging’
Valid option only for crawler service:
-
:type => ‘resume’ ‘resume-and-idle’ ‘refresh-inplace’ ‘refresh-new’
'new' 'apply-changes'
968 969 970 |
# File 'lib/acceleration/velocity.rb', line 968 def start( = {}) act 'start', end |
#stop(options = {}) ⇒ Object
Stop the service
Valid options for either service are:
-
:subcollection => ‘live’ (default) or ‘staging’
-
:kill => true or false
980 981 982 |
# File 'lib/acceleration/velocity.rb', line 980 def stop( = {}) act 'stop', end |