PagesList.Stripe
bucketsSize, name
Constructor and Description |
---|
FreeListImpl(int cacheId,
String name,
MemoryMetricsImpl memMetrics,
MemoryPolicy memPlc,
ReuseList reuseList,
IgniteWriteAheadLogManager wal,
long metaPageId,
boolean initNew) |
Modifier and Type | Method and Description |
---|---|
void |
addForRecycle(ReuseBag bag) |
protected boolean |
casBucket(int bucket,
PagesList.Stripe[] exp,
PagesList.Stripe[] upd) |
void |
dumpStatistics(IgniteLogger log) |
int |
emptyDataPages() |
float |
fillFactor()
Calculates average fill factor over FreeListImpl instance.
|
protected PagesList.Stripe[] |
getBucket(int bucket) |
void |
insertDataRow(CacheDataRow row) |
protected boolean |
isReuseBucket(int bucket) |
long |
recycledPagesCount() |
void |
removeDataRowByLink(long link) |
long |
takeRecycledPage() |
String |
toString() |
boolean |
updateDataRow(long link,
CacheDataRow row) |
init, put, removeDataPage, saveMetadata, storedPagesCount, takeEmptyPage
acquirePage, allocatePage, allocatePageNoReuse, getCacheId, init, needWalDeltaRecord, onBeforeReadLock, onBeforeWriteLock, onReadLock, onReadUnlock, onWriteLock, onWriteUnlock, pageSize, randomInt, read, read, readLock, readUnlock, recyclePage, releasePage, tryWriteLock, write, write, write, write, writeLock, writeUnlock, writeUnlock
public FreeListImpl(int cacheId, String name, MemoryMetricsImpl memMetrics, MemoryPolicy memPlc, ReuseList reuseList, IgniteWriteAheadLogManager wal, long metaPageId, boolean initNew) throws IgniteCheckedException
cacheId
- Cache ID.name
- Name (for debug purpose).memMetrics
- Memory metrics.memPlc
- Memory policy.reuseList
- Reuse list or null
if this free list will be a reuse list for itself.wal
- Write ahead log manager.metaPageId
- Metadata page ID.initNew
- True
if new metadata should be initialized.IgniteCheckedException
- If failed.public float fillFactor()
public void dumpStatistics(IgniteLogger log)
dumpStatistics
in interface FreeList
log
- Logger.public void insertDataRow(CacheDataRow row) throws IgniteCheckedException
insertDataRow
in interface FreeList
row
- Row.IgniteCheckedException
- If failed.public boolean updateDataRow(long link, CacheDataRow row) throws IgniteCheckedException
updateDataRow
in interface FreeList
link
- Row link.row
- New row data.True
if was able to update row.IgniteCheckedException
- If failed.public void removeDataRowByLink(long link) throws IgniteCheckedException
removeDataRowByLink
in interface FreeList
link
- Row link.IgniteCheckedException
- If failed.protected PagesList.Stripe[] getBucket(int bucket)
protected boolean casBucket(int bucket, PagesList.Stripe[] exp, PagesList.Stripe[] upd)
protected boolean isReuseBucket(int bucket)
isReuseBucket
in class PagesList
bucket
- Bucket index.true
If it is a reuse bucket.public int emptyDataPages()
public void addForRecycle(ReuseBag bag) throws IgniteCheckedException
addForRecycle
in interface ReuseList
bag
- Reuse bag.IgniteCheckedException
- If failed.public long takeRecycledPage() throws IgniteCheckedException
takeRecycledPage
in interface ReuseList
0
if none available.IgniteCheckedException
- If failed.public long recycledPagesCount() throws IgniteCheckedException
recycledPagesCount
in interface ReuseList
IgniteCheckedException
- If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017