Class CopyOperation

All Implemented Interfaces:
BHiveExecution, Callable<TransferStatistics>

public class CopyOperation extends BHive.Operation<TransferStatistics>
The CopyOperation copies objects and manifests from one local BHive to another local BHive.

If no Manifest or ObjectId is set, the whole contents of the local BHive the operation is executed on will be copied.

  • Constructor Details

    • CopyOperation

      public CopyOperation()
  • Method Details

    • call

      public TransferStatistics call() throws Exception
      Throws:
      Exception
    • addObject

      public CopyOperation addObject(ObjectId object)
      Add an ObjectId to be copied into the destination hive
    • addObject

      public CopyOperation addObject(Collection<ObjectId> objectIds)
      Add an ObjectIds to be copied into the destination hive
    • addManifest

      public CopyOperation addManifest(Collection<Manifest.Key> keys)
      Adds multiple Manifests to be inserted into the destination hive.

      CAUTION: this will only insert the manifest, NO object which is required/referenced by the manifest will be copied automatically. All ObjectIds to be copied need to be added using addObject(ObjectId).

    • addManifest

      public CopyOperation addManifest(Manifest.Key key)
      Add a Manifest to be inserted into the destination hive.

      CAUTION: this will only insert the manifest, NO object which is required/referenced by the manifest will be copied automatically. All ObjectIds to be copied need to be added using addObject(ObjectId).

    • setPartialAllowed

      public CopyOperation setPartialAllowed(boolean allowed)
      If a partial destination hive is allowed (default false), no consistency check on the destination hive will be performed after copying objects. Normally a quick consistency (reachability of referenced objects for transfered manifests) will be performed to assure all is well.
    • setDestinationHive

      public CopyOperation setDestinationHive(BHiveExecution hive)
      The destination BHive.