public class DatabaseReconciliator extends java.lang.Object
DownOperation). Its main responsibility is to compare the local database to the other clients' delta databases. The final goal of the algorithms described in this class is to determine a winning
MemoryDatabase(or better: a winning
DatabaseBranch) of a client.
All algorithm parts largely rely on the comparison of a client's database branch, i.e. its
committed set of
DatabaseVersions. Instead of comparing the entire database versions
of the different clients, however, the comparisons solely rely on the
In particular, most of them only compare the
VectorClock. If the vector clocks are
in conflict (= simultaneous), the local timestamp is used as a final decision (oldest wins).
|Constructor and Description|
|Modifier and Type||Method and Description|
Implements the core synchronization algorithm as described
public java.util.Map.Entry<java.lang.String,DatabaseBranch> findWinnerBranch(DatabaseBranches allBranches) throws java.lang.Exception
in the class description.
localMachineName- Client name of the local machine (required for branch stitching)
localBranch- Local branch, created from the local database
unknownRemoteBranches- Newly downloaded unknown remote branches (incomplete branches; will be stitched)
public DatabaseBranch findLosersPruneBranch(DatabaseBranch losersBranch, DatabaseBranch winnersBranch)
Syncany is an open-source cloud storage and filesharing application.
Code located at https://github.com/syncany/syncany
JavaDoc for version 0.4.9-alpha generated based on commit 2ab2a6f at Thu May 25 10:14:24 UTC 2017
Copyright © 2011-2015 Philipp C. Heckel