Class DfsReftableBatchRefUpdate

    • 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: ReftableBatchRefUpdate
        Implements the storage-specific part of the update.
        Specified by:
        applyUpdates in class ReftableBatchRefUpdate
        Parameters:
        newRefs - the new refs to create
        pending - 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)