public class Indexer extends java.lang.ObjectThe indexer combines the chunking process with the corresponding database lookups for the resulting chunks. It implements the deduplication mechanism of Syncany.
The class takes a list of files as input and uses the
Deduperto break these files into individual chunks. By implementing the
DeduperListener, it reacts on chunking events and creates a new database version (with the newly added/changed/removed files. This functionality is entirely implemented by the index() method.
The class uses the currently loaded
MemoryDatabaseas well as a potential dirty database into account. Lookups for chunks and file histories are performed on both databases.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
index(java.util.List<java.io.File> files, java.util.List<java.io.File> deletedFiles, java.util.Queue<DatabaseVersion> databaseVersionQueue)This method implements the index/deduplication functionality of Syncany.
public void index(java.util.List<java.io.File> files, java.util.List<java.io.File> deletedFiles, java.util.Queue<DatabaseVersion> databaseVersionQueue) throws java.io.IOExceptionThis method implements the index/deduplication functionality of Syncany. It uses a
Deduperto break files down, compares them to the local database and creates a new
DatabaseVersionas a result.
files- List of files to be deduplicated
deletedFiles- List of files that have been deleted
databaseVersionQueue- Queue to which created databaseVersions are offered
java.io.IOException- If the chunking/deduplication cannot read/process any of the files