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, writeaddCommand, 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, toStringprivate 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
ReftableBatchRefUpdateapplyUpdates in class ReftableBatchRefUpdatenewRefs - 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.IOExceptionprivate ReftableWriter.Stats compactTopOfStack(java.io.OutputStream out, ReftableConfig cfg, byte[] newTable) throws java.io.IOException
java.io.IOExceptionprivate java.util.Set<DfsPackDescription> toPruneTopOfStack() throws java.io.IOException
java.io.IOExceptionprivate boolean packOnlyContainsReftable(DfsPackDescription desc)