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 DeltaWindowEntry
If we have chosen a base, the window entry it was created from.private final long
private long
private final PackConfig
private int
private Deflater
Used to compress cached deltas.private Object
private final DeltaCache
private int
private int
private long
Amount of memory we have loaded right now.private final int
Maximum depth we should create for any delta chain.private final long
Maximum number of bytes to admit to the window at once.private final ProgressMonitor
private static final boolean
private static final boolean
private final ObjectReader
private DeltaWindowEntry
Window 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 void
cacheDelta
(ObjectToPack srcObj, ObjectToPack resObj) private void
checkLoadable
(DeltaWindowEntry ent, long need) private void
clear
(DeltaWindowEntry ent) private void
private static int
deflateBound
(int insz) private Deflater
deflater()
private boolean
delta
(DeltaWindowEntry src) private int
private static long
private static long
estimateSize
(ObjectToPack ent) private DeltaIndex
index
(DeltaWindowEntry ent) private void
(package private) DeltaTask.Slice
(package private) void
search()
private void
private void
selectDeltaBase
(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
-