public class DfsReftableBatchRefUpdate extends ReftableBatchRefUpdate
Modifier and Type | Field and Description |
---|---|
private static int |
AVG_BYTES |
private DfsObjDatabase |
odb |
private DfsReftableDatabase |
refdb |
MAX_WAIT
Modifier | Constructor and Description |
---|---|
protected |
DfsReftableBatchRefUpdate(DfsReftableDatabase refdb,
DfsObjDatabase odb)
Initialize batch update.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyUpdates(java.util.List<Ref> newRefs,
java.util.List<ReceiveCommand> pending)
Implements the storage-specific part of the update.
|
private boolean |
canCompactTopOfStack(ReftableConfig cfg) |
private ReftableWriter.Stats |
compactTopOfStack(java.io.OutputStream out,
ReftableConfig cfg,
byte[] newTable) |
private boolean |
packOnlyContainsReftable(DfsPackDescription desc) |
private java.util.Set<DfsPackDescription> |
toPruneTopOfStack() |
execute, write
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
private static final int AVG_BYTES
private final DfsReftableDatabase refdb
private final DfsObjDatabase odb
protected DfsReftableBatchRefUpdate(DfsReftableDatabase refdb, DfsObjDatabase odb)
refdb
- database the update will modify.odb
- object database to store the reftable.protected void applyUpdates(java.util.List<Ref> newRefs, java.util.List<ReceiveCommand> pending) throws java.io.IOException
ReftableBatchRefUpdate
applyUpdates
in class ReftableBatchRefUpdate
newRefs
- the new refs to createpending
- the pending receive commands to be executedjava.io.IOException
- if any of the writes fail.private boolean canCompactTopOfStack(ReftableConfig cfg) throws java.io.IOException
java.io.IOException
private ReftableWriter.Stats compactTopOfStack(java.io.OutputStream out, ReftableConfig cfg, byte[] newTable) throws java.io.IOException
java.io.IOException
private java.util.Set<DfsPackDescription> toPruneTopOfStack() throws java.io.IOException
java.io.IOException
private boolean packOnlyContainsReftable(DfsPackDescription desc)