Module | RR::Replicators |
In: |
lib/rubyrep/replicators/replicators.rb
lib/rubyrep/replicators/two_way_replicator.rb |
Replicators are classes that implement the replication policies. This module provides functionality to register replicators and access the list of registered replicators. Each Replicator must register itself with Replicators#register. Each Replicator must implement the following methods:
# Creates a new replicator (A replicator is used for one replication run only) # * sync_helper: a SyncHelper object providing necessary information and functionalities def initialize(sync_helper) # Called to sync the provided difference. # +difference+ is an instance of +ReplicationDifference+ def replicate_difference(difference) # Provides default option for the replicator. Optional. # Returns a hash with :key => value pairs. def self.default_options
Registers one or multiple replicators. syncer_hash is a Hash with
key:: The adapter symbol as used to reference the replicator value:: The class implementing the replicator
Returns a Hash of currently registered replicators. (Empty Hash if no replicators were defined.)