Class: Velocity::Instance::SearchCollection::Status
- Inherits:
-
Object
- Object
- Velocity::Instance::SearchCollection::Status
- Defined in:
- lib/acceleration/velocity.rb
Overview
This models the collection status XML returned by Velocity.
Defined Under Namespace
Classes: CrawlerStatus, IndexerStatus, ServiceStatus
Instance Attribute Summary collapse
-
#doc ⇒ Object
The raw document describing the status.
Instance Method Summary collapse
-
#crawler ⇒ Object
Get the crawler status node.
-
#has_data? ⇒ Boolean
Check to see if the collection actually has a status.
-
#indexer ⇒ Object
Get the indexer status node.
-
#initialize(doc) ⇒ Status
constructor
Create a new wrapper for the status XML.
Constructor Details
#initialize(doc) ⇒ Status
Create a new wrapper for the status XML
761 762 763 |
# File 'lib/acceleration/velocity.rb', line 761 def initialize(doc) @doc = doc end |
Instance Attribute Details
#doc ⇒ Object
The raw document describing the status
756 757 758 |
# File 'lib/acceleration/velocity.rb', line 756 def doc @doc end |
Instance Method Details
#crawler ⇒ Object
Get the crawler status node
768 769 770 |
# File 'lib/acceleration/velocity.rb', line 768 def crawler CrawlerStatus.new doc.xpath('/vse-status/crawler-status').first end |
#has_data? ⇒ Boolean
Check to see if the collection actually has a status.
If false, then the collection isn’t running and has no data. if true, then the collection may be running but certainly has data.
784 785 786 |
# File 'lib/acceleration/velocity.rb', line 784 def has_data? doc.xpath('__CONTAINER__').empty? end |
#indexer ⇒ Object
Get the indexer status node
775 776 777 |
# File 'lib/acceleration/velocity.rb', line 775 def indexer IndexerStatus.new doc.xpath('/vse-status/vse-index-status').first end |