public abstract class ReftableBatchRefUpdate extends BatchRefUpdate
BatchRefUpdate
for Reftable based RefDatabase.MAX_WAIT
Modifier | Constructor and Description |
---|---|
protected |
ReftableBatchRefUpdate(RefDatabase refdb,
ReftableDatabase reftableDb,
Lock lock,
Repository repository)
Initialize.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
applyUpdates(List<Ref> newRefs,
List<ReceiveCommand> pending)
Implements the storage-specific part of the update.
|
void |
execute(RevWalk rw,
ProgressMonitor pm,
List<String> options)
Execute this batch update.
|
protected void |
write(ReftableWriter writer,
List<Ref> newRefs,
List<ReceiveCommand> pending)
Writes the refs to the writer, and calls finish.
|
addCommand, addCommand, addCommand, addPrefixesTo, addProposedTimestamp, blockUntilTimestamps, disableRefLog, execute, getCommands, getPrefixes, getProposedTimestamps, getPushCertificate, getPushOptions, getRefLogIdent, getRefLogMessage, getRefLogMessage, isAllowNonFastForwards, isAtomic, isForceRefLog, isForceRefLog, isRefLogDisabled, isRefLogDisabled, isRefLogIncludingResult, isRefLogIncludingResult, newUpdate, setAllowNonFastForwards, setAtomic, setForceRefLog, setPushCertificate, setPushOptions, setRefLogIdent, setRefLogMessage, toString
protected ReftableBatchRefUpdate(RefDatabase refdb, ReftableDatabase reftableDb, Lock lock, Repository repository)
refdb
- The RefDatabasereftableDb
- The ReftableDatabaselock
- A lock protecting the refdatabase's staterepository
- The repository on which this update will runpublic void execute(RevWalk rw, ProgressMonitor pm, List<String> options)
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()
.
execute
in class BatchRefUpdate
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 withoutprotected abstract void applyUpdates(List<Ref> newRefs, List<ReceiveCommand> pending) throws IOException
newRefs
- the new refs to createpending
- the pending receive commands to be executedIOException
- if any of the writes fail.protected void write(ReftableWriter writer, List<Ref> newRefs, List<ReceiveCommand> pending) throws IOException
writer
- the writer on which we should write.newRefs
- the ref data to write..pending
- the log data to write.IOException
- in case of problems.Copyright © 2020 Eclipse JGit Project. All rights reserved.