public class OffHeapCache extends Object implements EnvConfigObserver
| Modifier and Type | Class and Description |
|---|---|
static class |
OffHeapCache.BINInfo |
| Modifier and Type | Field and Description |
|---|---|
static long |
MIN_MAIN_CACHE_OVERHEAD |
| Constructor and Description |
|---|
OffHeapCache(EnvironmentImpl envImpl) |
| Modifier and Type | Method and Description |
|---|---|
long |
clearCache(EnvironmentImpl matchEnv) |
INLogEntry<BIN> |
createBINLogEntryForCheckpoint(IN parent,
int index) |
void |
doCriticalEviction(boolean backgroundIO) |
void |
doDaemonEviction(boolean backgroundIO) |
void |
doManualEvict() |
boolean |
ensureOffHeapLNsInLRU(BIN bin) |
void |
envConfigUpdate(DbConfigManager configManager,
EnvironmentMutableConfig ignore)
Notifies the observer that one or more mutable properties have been
changed.
|
void |
evictBINIfLsnMatch(EnvironmentImpl envImpl,
int entry,
long lsn) |
long |
freeBIN(BIN bin,
IN parent,
int index) |
int |
freeLN(BIN bin,
int index) |
void |
freeRedundantLN(BIN bin,
int index,
LN ln,
CacheMode cacheMode) |
OffHeapAllocator |
getAllocator() |
byte[] |
getBINBytes(IN parent,
int index) |
OffHeapCache.BINInfo |
getBINInfo(EnvironmentImpl envImpl,
int entry) |
long |
getMaxMemory() |
long |
getMemId(int entry) |
long |
getUsedMemory() |
boolean |
haveBINBytesChanged(IN parent,
int index,
byte[] bytes)
Called when a BIN's bytes were obtained holding a shared latch, and then
the latch was released and acquired again.
|
boolean |
isEnabled() |
BIN |
loadBIN(EnvironmentImpl envImpl,
int entry) |
BIN |
loadBINIfLsnMatches(EnvironmentImpl envImpl,
int entry,
long lsn)
Loads a BIN for the given entry, if its last logged LSN is the given
LSN.
|
LN |
loadLN(BIN bin,
int index,
CacheMode cacheMode) |
StatGroup |
loadStats(StatsConfig config) |
long |
loadVLSN(BIN bin,
int index) |
BIN |
materializeBIN(EnvironmentImpl envImpl,
byte[] buf) |
int |
moveBack(int entry,
boolean pri2) |
long |
mutateToBINDelta(IN parent,
int index) |
void |
postBINLoad(IN parent,
int index,
BIN bin) |
void |
postBINLog(IN parent,
int index,
INLogEntry<BIN> logEntry,
long newLsn) |
void |
preallocateLRUEntries()
Forces allocation of the first chunk of entries.
|
long |
removeINFromMain(IN in)
Called:
- after eviction of an IN from main cache, and in that case
storeEvictedBIN was called and the eviction was completed.
|
void |
requestShutdown() |
void |
setOwner(int entry,
IN owner) |
void |
shutdown() |
boolean |
storeEvictedBIN(BIN bin,
IN parent,
int index)
Called before eviction of a BIN from main cache to provide an
opportunity to store the BIN off-heap.
|
boolean |
storeEvictedLN(BIN bin,
int index,
LN ln)
Called before eviction of an LN from main cache to provide an
opportunity to store the LN off-heap.
|
boolean |
storePreloadedBIN(BIN bin,
IN parent,
int index)
Called when a BIN has been fetched from disk and should be stored
off-heap.
|
boolean |
storePreloadedLN(BIN bin,
int index,
LN ln)
Called when an LN has been fetched from disk and should be stored
off-heap.
|
long |
stripLNs(IN parent,
int index) |
public static final long MIN_MAIN_CACHE_OVERHEAD
public OffHeapCache(EnvironmentImpl envImpl)
public void envConfigUpdate(DbConfigManager configManager, EnvironmentMutableConfig ignore)
EnvConfigObserverenvConfigUpdate in interface EnvConfigObserverpublic void requestShutdown()
public void shutdown()
public boolean isEnabled()
public long clearCache(EnvironmentImpl matchEnv)
public StatGroup loadStats(StatsConfig config)
public long getMaxMemory()
public long getUsedMemory()
public void preallocateLRUEntries()
public OffHeapAllocator getAllocator()
public int moveBack(int entry,
boolean pri2)
public long getMemId(int entry)
public void setOwner(int entry,
IN owner)
public boolean storeEvictedLN(BIN bin, int index, LN ln)
public boolean storePreloadedLN(BIN bin, int index, LN ln)
public boolean ensureOffHeapLNsInLRU(BIN bin)
public long loadVLSN(BIN bin, int index)
public int freeLN(BIN bin, int index)
public boolean storeEvictedBIN(BIN bin, IN parent, int index)
public boolean storePreloadedBIN(BIN bin, IN parent, int index)
public long removeINFromMain(IN in)
public BIN loadBIN(EnvironmentImpl envImpl, int entry)
public BIN loadBINIfLsnMatches(EnvironmentImpl envImpl, int entry, long lsn)
public void evictBINIfLsnMatch(EnvironmentImpl envImpl, int entry, long lsn)
public byte[] getBINBytes(IN parent, int index)
public boolean haveBINBytesChanged(IN parent, int index, byte[] bytes)
public BIN materializeBIN(EnvironmentImpl envImpl, byte[] buf)
public INLogEntry<BIN> createBINLogEntryForCheckpoint(IN parent, int index)
public void postBINLog(IN parent, int index, INLogEntry<BIN> logEntry, long newLsn)
public OffHeapCache.BINInfo getBINInfo(EnvironmentImpl envImpl, int entry)
public void doCriticalEviction(boolean backgroundIO)
public void doDaemonEviction(boolean backgroundIO)
public void doManualEvict()
public long stripLNs(IN parent, int index)
public long mutateToBINDelta(IN parent, int index)
Copyright © 2024. All rights reserved.