public abstract class AbstractFreeList<T extends Storable> extends PagesList implements FreeList<T>, ReuseList
PagesList.StripebucketsSize, changed, name| Constructor and Description |
|---|
AbstractFreeList(int cacheId,
String name,
DataRegionMetricsImpl memMetrics,
DataRegion 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() |
long |
freeSpace()
Calculates free space tracked by this FreeListImpl instance.
|
protected PagesList.Stripe[] |
getBucket(int bucket) |
void |
insertDataRow(T row) |
abstract IOVersions<? extends AbstractDataPageIO<T>> |
ioVersions() |
protected boolean |
isReuseBucket(int bucket) |
long |
recycledPagesCount() |
void |
removeDataRowByLink(long link) |
long |
takeRecycledPage() |
String |
toString() |
boolean |
updateDataRow(long link,
T row) |
init, put, removeDataPage, saveMetadata, storedPagesCount, takeEmptyPageacquirePage, allocatePage, allocatePage, allocatePageNoReuse, groupId, init, needWalDeltaRecord, onBeforeReadLock, onBeforeWriteLock, onReadLock, onReadUnlock, onWriteLock, onWriteUnlock, pageSize, randomInt, read, read, readLock, readUnlock, recyclePage, releasePage, tryWriteLock, write, write, write, write, writeLock, writeUnlock, writeUnlockpublic AbstractFreeList(int cacheId,
String name,
DataRegionMetricsImpl memMetrics,
DataRegion memPlc,
ReuseList reuseList,
IgniteWriteAheadLogManager wal,
long metaPageId,
boolean initNew)
throws IgniteCheckedException
cacheId - Cache ID.name - Name (for debug purpose).memMetrics - Memory metrics.memPlc - Data region.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 long freeSpace()
public void dumpStatistics(IgniteLogger log)
dumpStatistics in interface FreeList<T extends Storable>log - Logger.public void insertDataRow(T row) throws IgniteCheckedException
insertDataRow in interface FreeList<T extends Storable>row - Row.IgniteCheckedException - If failed.public boolean updateDataRow(long link,
T row)
throws IgniteCheckedException
updateDataRow in interface FreeList<T extends Storable>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<T extends Storable>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 PagesListbucket - Bucket index.true If it is a reuse bucket.public int emptyDataPages()
public void addForRecycle(ReuseBag bag) throws IgniteCheckedException
addForRecycle in interface ReuseListbag - Reuse bag.IgniteCheckedException - If failed.public long takeRecycledPage()
throws IgniteCheckedException
takeRecycledPage in interface ReuseList0 if none available.IgniteCheckedException - If failed.public long recycledPagesCount()
throws IgniteCheckedException
recycledPagesCount in interface ReuseListIgniteCheckedException - If failed.public abstract IOVersions<? extends AbstractDataPageIO<T>> ioVersions()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018