Package org.hive2hive.core.processes.implementations.common

Examples of org.hive2hive.core.processes.implementations.common.File2MetaFileComponent


    H2HSession session = networkManager.getSession();

    SequentialProcess process = new SequentialProcess();
    process.add(new ValidateFileSizeStep(context, session.getFileConfiguration(), false));
    process.add(new CheckWriteAccessStep(context, session.getProfileManager(), session.getRoot()));
    process.add(new File2MetaFileComponent(file, context, context, networkManager));
    process.add(new InitializeChunksStep(context, dataManager, session.getFileConfiguration()));
    process.add(new CreateNewVersionStep(context, session.getFileConfiguration()));
    process.add(new PutMetaFileStep(context, dataManager));
    process.add(new UpdateMD5inUserProfileStep(context, session.getProfileManager()));
View Full Code Here


  public ProcessComponent createRecoverFileProcess(File file, IVersionSelector selector, NetworkManager networkManager)
      throws NoSessionException, NoPeerConnectionException {
    RecoverFileContext context = new RecoverFileContext(file);
    SequentialProcess process = new SequentialProcess();
    process.add(new File2MetaFileComponent(file, context, context, networkManager));
    process.add(new SelectVersionStep(context, selector, networkManager));

    return process;
  }
View Full Code Here

    if (index.isFile()) {
      /**
       * Delete the meta file and all chunks
       */
      File2MetaFileComponent file2Meta = new File2MetaFileComponent(index, context, context,
          dataManager);
      DeleteChunksProcess deleteChunks = new DeleteChunksProcess(context, dataManager);
      DeleteMetaFileStep deleteMeta = new DeleteMetaFileStep(context, dataManager);

      // insert them in correct order
View Full Code Here

    // each meta document gets own context
    MetaDocumentPKUpdateContext metaContext = new MetaDocumentPKUpdateContext(
        context.consumeOldProtectionKeys(), context.consumeNewProtectionKeys(),
        index.getFilePublicKey(), index);
    sequential.add(new File2MetaFileComponent(index, metaContext, metaContext, dataManager));
    sequential.add(new ChangeProtectionKeysStep(metaContext, dataManager));
    sequential.add(new InitializeChunkUpdateStep(metaContext, dataManager));
    return sequential;
  }
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.implementations.common.File2MetaFileComponent

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.