Class: Velocity::Instance::SearchCollection::CollectionService

Inherits:
APIModel
  • Object
show all
Defined in:
lib/acceleration/velocity.rb

Overview

A model for the collections’ services

Direct Known Subclasses

Crawler, Indexer

Instance Attribute Summary collapse

Attributes inherited from APIModel

#instance

Instance Method Summary collapse

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

#collectionObject

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(options = {})
  act 'restart', options
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(options = {})
  act 'start', options
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(options = {})
  act 'stop', options
end