Search in sources :

Example 1 with ChunkerTO

use of org.syncany.config.to.RepoTO.ChunkerTO in project syncany by syncany.

the class DefaultRepoTOFactory method getDefaultChunkerTO.

protected ChunkerTO getDefaultChunkerTO() {
    ChunkerTO chunkerTO = new ChunkerTO();
    chunkerTO.setType(FixedChunker.TYPE);
    chunkerTO.setSettings(new HashMap<String, String>());
    chunkerTO.getSettings().put(Chunker.PROPERTY_SIZE, "16");
    return chunkerTO;
}
Also used : ChunkerTO(org.syncany.config.to.RepoTO.ChunkerTO) MultiChunkerTO(org.syncany.config.to.RepoTO.MultiChunkerTO)

Example 2 with ChunkerTO

use of org.syncany.config.to.RepoTO.ChunkerTO in project syncany by syncany.

the class TestConfigUtil method createRepoTO.

public static RepoTO createRepoTO() {
    // Create Repo TO
    RepoTO repoTO = new RepoTO();
    repoTO.setRepoId(new byte[] { 0x01, 0x02, 0x03 });
    // Create ChunkerTO and MultiChunkerTO
    MultiChunkerTO multiChunkerTO = createZipMultiChunkerTO();
    ChunkerTO chunkerTO = createFixedChunkerTO();
    // TODO [low] Chunker not configurable right now. Not used.
    repoTO.setChunkerTO(chunkerTO);
    repoTO.setMultiChunker(multiChunkerTO);
    // Create TransformerTO
    List<TransformerTO> transformerTOs = createTransformerTOs();
    repoTO.setTransformers(transformerTOs);
    return repoTO;
}
Also used : ChunkerTO(org.syncany.config.to.RepoTO.ChunkerTO) MultiChunkerTO(org.syncany.config.to.RepoTO.MultiChunkerTO) MultiChunkerTO(org.syncany.config.to.RepoTO.MultiChunkerTO) TransformerTO(org.syncany.config.to.RepoTO.TransformerTO) RepoTO(org.syncany.config.to.RepoTO)

Example 3 with ChunkerTO

use of org.syncany.config.to.RepoTO.ChunkerTO in project syncany by syncany.

the class TestConfigUtil method createFixedChunkerTO.

public static ChunkerTO createFixedChunkerTO() {
    Map<String, String> settings = new HashMap<String, String>();
    settings.put(Chunker.PROPERTY_SIZE, "32768");
    ChunkerTO chunkerTO = new ChunkerTO();
    chunkerTO.setType("fixed");
    chunkerTO.setSettings(settings);
    return chunkerTO;
}
Also used : ChunkerTO(org.syncany.config.to.RepoTO.ChunkerTO) MultiChunkerTO(org.syncany.config.to.RepoTO.MultiChunkerTO) HashMap(java.util.HashMap)

Aggregations

ChunkerTO (org.syncany.config.to.RepoTO.ChunkerTO)3 MultiChunkerTO (org.syncany.config.to.RepoTO.MultiChunkerTO)3 HashMap (java.util.HashMap)1 RepoTO (org.syncany.config.to.RepoTO)1 TransformerTO (org.syncany.config.to.RepoTO.TransformerTO)1