Class DeltaBaseCache
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.file.DeltaBaseCache
-
class DeltaBaseCache extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classDeltaBaseCache.Entryprivate static classDeltaBaseCache.Slot
-
Field Summary
Fields Modifier and Type Field Description private DeltaBaseCache.Slot[]cacheprivate static intCACHE_SZ(package private) static java.lang.ref.SoftReference<DeltaBaseCache.Entry>DEADprivate static intdefaultMaxByteCountprivate DeltaBaseCache.SlotlruHeadprivate DeltaBaseCache.SlotlruTailprivate intmaxByteCountprivate intopenByteCount
-
Constructor Summary
Constructors Constructor Description DeltaBaseCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidclearEntry(DeltaBaseCache.Slot e)(package private) DeltaBaseCache.Entryget(Pack pack, long position)private static inthash(long position)private voidmoveToHead(DeltaBaseCache.Slot e)(package private) static voidreconfigure(WindowCacheConfig cfg)private voidreleaseMemory()(package private) voidstore(Pack pack, long position, byte[] data, int objectType)private voidunlink(DeltaBaseCache.Slot e)
-
-
-
Field Detail
-
CACHE_SZ
private static final int CACHE_SZ
- See Also:
- Constant Field Values
-
DEAD
static final java.lang.ref.SoftReference<DeltaBaseCache.Entry> DEAD
-
defaultMaxByteCount
private static volatile int defaultMaxByteCount
-
maxByteCount
private final int maxByteCount
-
cache
private final DeltaBaseCache.Slot[] cache
-
lruHead
private DeltaBaseCache.Slot lruHead
-
lruTail
private DeltaBaseCache.Slot lruTail
-
openByteCount
private int openByteCount
-
-
Method Detail
-
hash
private static int hash(long position)
-
reconfigure
static void reconfigure(WindowCacheConfig cfg)
-
get
DeltaBaseCache.Entry get(Pack pack, long position)
-
store
void store(Pack pack, long position, byte[] data, int objectType)
-
releaseMemory
private void releaseMemory()
-
moveToHead
private void moveToHead(DeltaBaseCache.Slot e)
-
unlink
private void unlink(DeltaBaseCache.Slot e)
-
clearEntry
private void clearEntry(DeltaBaseCache.Slot e)
-
-