Class: Stellr::Collections::RSync

Inherits:
Static show all
Defined in:
lib/stellr/collections/rsync.rb

Overview

RSync collection implementation.

Keeps two indexes around - one for searching and one for indexing. The difference when compared with the Static collection is that every now and then the changes are synced from the latter to the former using RSync, so no complete rebuild is necessary after a switch.

Instance Attribute Summary

Attributes inherited from Base

#logger, #name

Instance Method Summary collapse

Methods inherited from Static

#initialize, #switch

Methods inherited from WriteableCollection

#add_record, #add_records, #clear!, #delete_record, #dirty?, #flush, #initialize, #optimize

Methods inherited from SearchableCollection

#highlight, #initialize, #on_shutdown, #search, #size

Methods inherited from Base

create, #initialize, #on_shutdown

Methods included from Utils::Observable

#add_listener, #listeners, #notify_listeners

Methods included from Utils::Shutdown

#shutdown, #shutting_down?

Constructor Details

This class inherits a constructor from Stellr::Collections::Static

Instance Method Details

#batch_finishedObject



12
13
14
# File 'lib/stellr/collections/rsync.rb', line 12

def batch_finished
  switch if dirty?
end