use of org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusMetaIO in project ignite by apache.
the class IndexProcessor method inlineSize.
/**
* @param page Root page.
* @param grpId Cache group id.
* @param pageMemory Page memory.
* @return Inline size.
* @throws IgniteCheckedException If something went wrong.
*/
private int inlineSize(RootPage page, int grpId, PageMemory pageMemory) throws IgniteCheckedException {
long metaPageId = page.pageId().pageId();
final long metaPage = pageMemory.acquirePage(grpId, metaPageId);
try {
// Meta can't be removed.
long pageAddr = pageMemory.readLock(grpId, metaPageId, metaPage);
assert pageAddr != 0 : "Failed to read lock meta page [metaPageId=" + U.hexLong(metaPageId) + ']';
try {
BPlusMetaIO io = BPlusMetaIO.VERSIONS.forPage(pageAddr);
return io.getInlineSize(pageAddr);
} finally {
pageMemory.readUnlock(grpId, metaPageId, metaPage);
}
} finally {
pageMemory.releasePage(grpId, metaPageId, metaPage);
}
}
use of org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusMetaIO in project ignite by apache.
the class MetaPageAddRootRecord method applyDelta.
/**
* {@inheritDoc}
*/
@Override
public void applyDelta(PageMemory pageMem, long pageAddr) throws IgniteCheckedException {
BPlusMetaIO io = BPlusMetaIO.VERSIONS.forPage(pageAddr);
io.addRoot(pageAddr, rootId, pageMem.realPageSize(groupId()));
}
use of org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusMetaIO in project ignite by apache.
the class MetaPageInitRootInlineRecord method applyDelta.
/**
* {@inheritDoc}
*/
@Override
public void applyDelta(PageMemory pageMem, long pageAddr) throws IgniteCheckedException {
BPlusMetaIO io = BPlusMetaIO.VERSIONS.forPage(pageAddr);
io.initRoot(pageAddr, rootId, pageMem.realPageSize(groupId()));
io.setInlineSize(pageAddr, inlineSize);
}
use of org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusMetaIO in project ignite by apache.
the class MetaPageInitRootInlineFlagsCreatedVersionRecord method applyDelta.
/**
* {@inheritDoc}
*/
@Override
public void applyDelta(PageMemory pageMem, long pageAddr) throws IgniteCheckedException {
super.applyDelta(pageMem, pageAddr);
BPlusMetaIO io = BPlusMetaIO.VERSIONS.forPage(pageAddr);
io.initFlagsAndVersion(pageAddr, flags, createdVer);
}
use of org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusMetaIO in project ignite by apache.
the class MetaPageInitRootRecord method applyDelta.
/**
* {@inheritDoc}
*/
@Override
public void applyDelta(PageMemory pageMem, long pageAddr) throws IgniteCheckedException {
BPlusMetaIO io = BPlusMetaIO.VERSIONS.forPage(pageAddr);
io.initRoot(pageAddr, rootId, pageMem.realPageSize(groupId()));
io.setInlineSize(pageAddr, 0);
}
Aggregations