use of org.apache.hyracks.storage.am.common.api.ITreeIndexFrame in project asterixdb by apache.
the class VirtualFreePageManager method init.
@Override
public void init(ITreeIndexFrameFactory interiorFrameFactory, ITreeIndexFrameFactory leafFrameFactory) throws HyracksDataException {
currentPageId.set(1);
ICachedPage page = bufferCache.pin(BufferedFileHandle.getDiskPageId(fileId, 0), true);
page.acquireWriteLatch();
page.releaseWriteLatch(false);
bufferCache.unpin(page);
page = bufferCache.pin(BufferedFileHandle.getDiskPageId(fileId, currentPageId.get()), true);
if (leafFrameFactory != null) {
page.acquireWriteLatch();
ITreeIndexFrame leafFrame = leafFrameFactory.createFrame();
leafFrame.setPage(page);
leafFrame.initBuffer((byte) 0);
page.releaseWriteLatch(true);
}
bufferCache.unpin(page);
}
Aggregations