Class ReftableBatchRefUpdate

java.lang.Object
org.eclipse.jgit.lib.BatchRefUpdate
org.eclipse.jgit.internal.storage.reftable.ReftableBatchRefUpdate
Direct Known Subclasses:
DfsReftableBatchRefUpdate

public abstract class ReftableBatchRefUpdate extends BatchRefUpdate
BatchRefUpdate for Reftable based RefDatabase.
  • Constructor Details

    • ReftableBatchRefUpdate

      protected ReftableBatchRefUpdate(RefDatabase refDb, ReftableDatabase reftableDb, Lock lock, Repository repository)
      Initialize.
      Parameters:
      refDb - The RefDatabase
      reftableDb - The ReftableDatabase
      lock - A lock protecting the refdatabase's state
      repository - The repository on which this update will run
  • Method Details

    • execute

      public void execute(RevWalk rw, ProgressMonitor pm, List<String> options)
      Description copied from class: BatchRefUpdate
      Execute this batch update.

      The default implementation of this method performs a sequential reference update over each reference.

      Implementations must respect the atomicity requirements of the underlying database as described in BatchRefUpdate.setAtomic(boolean) and RefDatabase.performsAtomicTransactions().

      Overrides:
      execute in class BatchRefUpdate
      Parameters:
      rw - a RevWalk to parse tags in case the storage system wants to store them pre-peeled, a common performance optimization.
      pm - progress monitor to receive update status on.
      options - a list of option strings; set null to execute without
    • applyUpdates

      protected abstract void applyUpdates(List<Ref> newRefs, List<ReceiveCommand> pending) throws IOException
      Implements the storage-specific part of the update.
      Parameters:
      newRefs - the new refs to create
      pending - the pending receive commands to be executed
      Throws:
      IOException - if any of the writes fail.
    • write

      protected void write(ReftableWriter writer, List<Ref> newRefs, List<ReceiveCommand> pending) throws IOException
      Writes the refs to the writer, and calls finish.
      Parameters:
      writer - the writer on which we should write.
      newRefs - the ref data to write..
      pending - the log data to write.
      Throws:
      IOException - in case of problems.