Module org.eclipse.jgit
Interface DfsPackCompactor.PreCommitHook
- Enclosing class:
- DfsPackCompactor
public static interface DfsPackCompactor.PreCommitHook
Hook invoked after the compact calculation is done, but before committing
the resulting packs.
The hook implementations must not modify the incoming collections.
Instead, they should return any extra packs to commit or remove in a
DfsPackCompactor.PreCommitHook.Packs record, which the caller will combine with the calculated
results.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordExtra packs to commit and remove as result of the hook execution. -
Method Summary
Modifier and TypeMethodDescriptionapply(List<DfsPackDescription> newPacks, Set<DfsPackDescription> removedPacks) Apply the hook.
-
Method Details
-
apply
@Nullable DfsPackCompactor.PreCommitHook.Packs apply(List<DfsPackDescription> newPacks, Set<DfsPackDescription> removedPacks) throws IOException Apply the hook.- Parameters:
newPacks- new packs created by this compaction. Read only.removedPacks- packs that are being replaced by this compaction. Read only.- Returns:
- Packs containing extra packs to commit and remove, or null if none.
- Throws:
IOException- an error occurred in the hook.
-