Class DfsReftableBatchRefUpdate
- java.lang.Object
-
- org.eclipse.jgit.lib.BatchRefUpdate
-
- org.eclipse.jgit.internal.storage.reftable.ReftableBatchRefUpdate
-
- org.eclipse.jgit.internal.storage.dfs.DfsReftableBatchRefUpdate
-
public class DfsReftableBatchRefUpdate extends ReftableBatchRefUpdate
-
-
Field Summary
Fields Modifier and Type Field Description private static intAVG_BYTESprivate DfsObjDatabaseodbprivate DfsReftableDatabaserefdb-
Fields inherited from class org.eclipse.jgit.lib.BatchRefUpdate
MAX_WAIT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDfsReftableBatchRefUpdate(DfsReftableDatabase refdb, DfsObjDatabase odb)Initialize batch update.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyUpdates(java.util.List<Ref> newRefs, java.util.List<ReceiveCommand> pending)Implements the storage-specific part of the update.private booleancanCompactTopOfStack(ReftableConfig cfg)private ReftableWriter.StatscompactTopOfStack(java.io.OutputStream out, ReftableConfig cfg, byte[] newTable)private booleanpackOnlyContainsReftable(DfsPackDescription desc)private java.util.Set<DfsPackDescription>toPruneTopOfStack()-
Methods inherited from class org.eclipse.jgit.internal.storage.reftable.ReftableBatchRefUpdate
execute, write
-
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
-
AVG_BYTES
private static final int AVG_BYTES
- See Also:
- Constant Field Values
-
refdb
private final DfsReftableDatabase refdb
-
odb
private final DfsObjDatabase odb
-
-
Constructor Detail
-
DfsReftableBatchRefUpdate
protected DfsReftableBatchRefUpdate(DfsReftableDatabase refdb, DfsObjDatabase odb)
Initialize batch update.- Parameters:
refdb- database the update will modify.odb- object database to store the reftable.
-
-
Method Detail
-
applyUpdates
protected void applyUpdates(java.util.List<Ref> newRefs, java.util.List<ReceiveCommand> pending) throws java.io.IOException
Description copied from class:ReftableBatchRefUpdateImplements the storage-specific part of the update.- Specified by:
applyUpdatesin classReftableBatchRefUpdate- Parameters:
newRefs- the new refs to createpending- the pending receive commands to be executed- Throws:
java.io.IOException- if any of the writes fail.
-
canCompactTopOfStack
private boolean canCompactTopOfStack(ReftableConfig cfg) throws java.io.IOException
- Throws:
java.io.IOException
-
compactTopOfStack
private ReftableWriter.Stats compactTopOfStack(java.io.OutputStream out, ReftableConfig cfg, byte[] newTable) throws java.io.IOException
- Throws:
java.io.IOException
-
toPruneTopOfStack
private java.util.Set<DfsPackDescription> toPruneTopOfStack() throws java.io.IOException
- Throws:
java.io.IOException
-
packOnlyContainsReftable
private boolean packOnlyContainsReftable(DfsPackDescription desc)
-
-