Class RefTreeBatch
- java.lang.Object
-
- org.eclipse.jgit.lib.BatchRefUpdate
-
- org.eclipse.jgit.internal.storage.reftree.RefTreeBatch
-
class RefTreeBatch extends BatchRefUpdate
Batch update aRefTreeDatabase
.
-
-
Field Summary
Fields Modifier and Type Field Description private PersonIdent
author
private ObjectId
newCommitId
private ObjectId
parentCommitId
private ObjectId
parentTreeId
private RefTreeDatabase
refdb
private Ref
src
private RefTree
tree
-
Fields inherited from class org.eclipse.jgit.lib.BatchRefUpdate
MAX_WAIT
-
-
Constructor Summary
Constructors Constructor Description RefTreeBatch(RefTreeDatabase refdb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
apply(java.util.List<Command> todo)
private void
commit(RevWalk rw, java.util.List<Command> todo)
(package private) Ref
exactRef(ObjectReader reader, java.lang.String name)
(package private) void
execute(RevWalk rw, java.util.List<Command> todo)
Execute an update fromRefTreeUpdate
orRefTreeRename
.void
execute(RevWalk rw, ProgressMonitor monitor)
Execute this batch update without option strings.(package private) void
init(RevWalk rw)
private void
updateBootstrap(RevWalk rw, ReceiveCommand commit)
-
Methods inherited from class org.eclipse.jgit.lib.BatchRefUpdate
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
-
-
-
-
Field Detail
-
refdb
private final RefTreeDatabase refdb
-
src
private Ref src
-
parentCommitId
private ObjectId parentCommitId
-
parentTreeId
private ObjectId parentTreeId
-
tree
private RefTree tree
-
author
private PersonIdent author
-
newCommitId
private ObjectId newCommitId
-
-
Constructor Detail
-
RefTreeBatch
RefTreeBatch(RefTreeDatabase refdb)
-
-
Method Detail
-
execute
public void execute(RevWalk rw, ProgressMonitor monitor) throws java.io.IOException
Execute this batch update without option strings.- Overrides:
execute
in classBatchRefUpdate
- Parameters:
rw
- a RevWalk to parse tags in case the storage system wants to store them pre-peeled, a common performance optimization.monitor
- progress monitor to receive update status on.- Throws:
java.io.IOException
- the database is unable to accept the update. Individual command status must be tested to determine if there is a partial failure, or a total failure.
-
init
void init(RevWalk rw) throws java.io.IOException
- Throws:
java.io.IOException
-
exactRef
@Nullable Ref exactRef(ObjectReader reader, java.lang.String name) throws java.io.IOException
- Throws:
java.io.IOException
-
execute
void execute(RevWalk rw, java.util.List<Command> todo) throws java.io.IOException
Execute an update fromRefTreeUpdate
orRefTreeRename
.- Parameters:
rw
- current RevWalk handling the update or rename.todo
- commands to execute. Must never be a bootstrap reference name.- Throws:
java.io.IOException
- the storage system is unable to read or write data.
-
apply
private boolean apply(java.util.List<Command> todo) throws java.io.IOException
- Throws:
java.io.IOException
-
commit
private void commit(RevWalk rw, java.util.List<Command> todo) throws java.io.IOException
- Throws:
java.io.IOException
-
updateBootstrap
private void updateBootstrap(RevWalk rw, ReceiveCommand commit) throws java.io.IOException
- Throws:
java.io.IOException
-
-