Package org.syncany.operations

Examples of org.syncany.operations.Downloader


  public RestoreOperation(Config config, RestoreOperationOptions options) {
    super(config, ACTION_ID);
   
    this.options = options;
    this.localDatabase = new SqlDatabase(config);
    this.downloader = new Downloader(config, transferManager);
  }
View Full Code Here


  public ApplyChangesOperation(Config config, SqlDatabase localDatabase, TransferManager transferManager, MemoryDatabase winnersDatabase, DownOperationResult result) {
    super(config);
   
    this.localDatabase = localDatabase;
    this.downloader = new Downloader(config, transferManager);
    this.winnersDatabase = winnersDatabase;
    this.result = result;
  }
View Full Code Here

      FileVersion fileVersion = localDatabase.getFileVersion(fileHistoryId, version);
      FileContent fileContent = localDatabase.getFileContent(fileVersion.getChecksum(), true);
      Map<ChunkChecksum, MultiChunkId> multiChunks = localDatabase.getMultiChunkIdsByChecksums(fileContent.getChunks());

      TransferManager transferManager = config.getTransferPlugin().createTransferManager(config.getConnection(), config);
      Downloader downloader = new Downloader(config, transferManager);
      Assembler assembler = new Assembler(config, localDatabase);

      downloader.downloadAndDecryptMultiChunks(new HashSet<MultiChunkId>(multiChunks.values()));

      File tempFile = assembler.assembleToCache(fileVersion);
      String tempFileToken = StringUtil.toHex(ObjectId.secureRandomBytes(40));
     
      GetFileFolderResponse fileResponse = new GetFileFolderResponse(concreteRequest.getId(), concreteRequest.getRoot(), tempFileToken);
View Full Code Here

TOP

Related Classes of org.syncany.operations.Downloader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.