com.amazon.carbonado.capability
Interface ResyncCapability

All Superinterfaces:
Capability

public interface ResyncCapability
extends Capability

Capability of replicating repositories for re-synchronizing to the master repository. A re-sync operation can be used to fill up a fresh replication repository or to repair inconsistencies.

Author:
Brian S O'Neill

Nested Class Summary
static interface ResyncCapability.Listener<S>
          Defines callbacks which are invoked as storables get re-sync'd.
 
Method Summary
 Repository getMasterRepository()
          Returns the immediate master Repository, for manual comparison.
<S extends Storable>
void
resync(Class<S> type, double desiredSpeed, String filter, Object... filterValues)
          Re-synchronizes replicated storables against the master repository.
<S extends Storable>
void
resync(Class<S> type, ResyncCapability.Listener<? super S> listener, double desiredSpeed, String filter, Object... filterValues)
          Re-synchronizes replicated storables against the master repository.
 

Method Detail

resync

<S extends Storable> void resync(Class<S> type,
                                 double desiredSpeed,
                                 String filter,
                                 Object... filterValues)
            throws RepositoryException
Re-synchronizes replicated storables against the master repository.

Parameters:
type - type of storable to re-sync
desiredSpeed - throttling parameter - 1.0 = full speed, 0.5 = half speed, 0.1 = one-tenth speed, etc
filter - optional query filter to limit which objects get re-sync'ed
filterValues - filter values for optional filter
Throws:
RepositoryException

resync

<S extends Storable> void resync(Class<S> type,
                                 ResyncCapability.Listener<? super S> listener,
                                 double desiredSpeed,
                                 String filter,
                                 Object... filterValues)
            throws RepositoryException
Re-synchronizes replicated storables against the master repository.

Parameters:
type - type of storable to re-sync
listener - optional listener which gets notified as storables are re-sync'd
desiredSpeed - throttling parameter - 1.0 = full speed, 0.5 = half speed, 0.1 = one-tenth speed, etc
filter - optional query filter to limit which objects get re-sync'ed
filterValues - filter values for optional filter
Throws:
RepositoryException
Since:
1.2

getMasterRepository

Repository getMasterRepository()
Returns the immediate master Repository, for manual comparison. Direct updates to the master will likely create inconsistencies.



Copyright © 2006-2008 Amazon Technologies, Inc.. All Rights Reserved.