Class DeltaWindow
java.lang.Object
org.eclipse.jgit.internal.storage.pack.DeltaWindow
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class(package private) static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DeltaWindowEntryIf we have chosen a base, the window entry it was created from.private final longprivate longprivate final PackConfigprivate intprivate DeflaterUsed to compress cached deltas.private Objectprivate final DeltaCacheprivate intprivate intprivate longAmount of memory we have loaded right now.private final intMaximum depth we should create for any delta chain.private final longMaximum number of bytes to admit to the window at once.private final ProgressMonitorprivate static final booleanprivate static final booleanprivate final ObjectReaderprivate DeltaWindowEntryWindow entry of the object we are currently considering.private final ObjectToPack[] -
Constructor Summary
ConstructorsConstructorDescriptionDeltaWindow(PackConfig pc, DeltaCache dc, ObjectReader or, ProgressMonitor pm, long bpu, ObjectToPack[] in, int beginIndex, int endIndex) -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]buffer(DeltaWindowEntry ent) private voidcacheDelta(ObjectToPack srcObj, ObjectToPack resObj) private voidcheckLoadable(DeltaWindowEntry ent, long need) private voidclear(DeltaWindowEntry ent) private voidprivate static intdeflateBound(int insz) private Deflaterdeflater()private booleandelta(DeltaWindowEntry src) private intprivate static longprivate static longestimateSize(ObjectToPack ent) private DeltaIndexindex(DeltaWindowEntry ent) private void(package private) DeltaTask.Slice(package private) voidsearch()private voidprivate voidselectDeltaBase(DeltaWindowEntry src, OutputStream delta) (package private) boolean
-
Field Details
-
NEXT_RES
private static final boolean NEXT_RES- See Also:
-
NEXT_SRC
private static final boolean NEXT_SRC- See Also:
-
config
-
deltaCache
-
reader
-
monitor
-
bytesPerUnit
private final long bytesPerUnit -
bytesProcessed
private long bytesProcessed -
maxMemory
private final long maxMemoryMaximum number of bytes to admit to the window at once. -
maxDepth
private final int maxDepthMaximum depth we should create for any delta chain. -
toSearch
-
cur
private int cur -
end
private int end -
loaded
private long loadedAmount of memory we have loaded right now. -
res
Window entry of the object we are currently considering. -
bestBase
If we have chosen a base, the window entry it was created from. -
deltaLen
private int deltaLen -
deltaBuf
-
deflater
Used to compress cached deltas.
-
-
Constructor Details
-
DeltaWindow
DeltaWindow(PackConfig pc, DeltaCache dc, ObjectReader or, ProgressMonitor pm, long bpu, ObjectToPack[] in, int beginIndex, int endIndex)
-
-
Method Details
-
remaining
DeltaTask.Slice remaining() -
tryStealWork
-
search
- Throws:
IOException
-
estimateSize
-
estimateIndexSize
-
clearWindowOnTypeSwitch
private void clearWindowOnTypeSwitch() -
clear
-
searchInWindow
- Throws:
IOException
-
delta
- Throws:
IOException
-
selectDeltaBase
-
deltaSizeLimit
-
cacheDelta
-
deflateBound
private static int deflateBound(int insz) -
keepInWindow
private void keepInWindow() -
index
private DeltaIndex index(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException -
buffer
private byte[] buffer(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, IOException, LargeObjectException -
checkLoadable
-
deflater
-