/** {@inheritDoc} */ @Override public ReuseList reuseListForIndex(String idxName) { return grp.reuseList(); }
/** * @return Page ID. * @throws IgniteCheckedException If failed. */ private long allocateForTree() throws IgniteCheckedException { ReuseList reuseList = grp.reuseList(); long pageId; if (reuseList == null || (pageId = reuseList.takeRecycledPage()) == 0L) pageId = grp.dataRegion().pageMemory().allocatePage(grp.groupId(), INDEX_PARTITION, FLAG_IDX); return pageId; }
/** * @param p Partition. * @return Cache data store. * @throws IgniteCheckedException If failed. */ protected CacheDataStore createCacheDataStore0(int p) throws IgniteCheckedException { final long rootPage = allocateForTree(); CacheDataRowStore rowStore = new CacheDataRowStore(grp, grp.freeList(), p); String idxName = treeName(p); CacheDataTree dataTree = new CacheDataTree( grp, idxName, grp.reuseList(), rowStore, rootPage, true); return new CacheDataStoreImpl(p, idxName, rowStore, dataTree); }
/** * @param cctx Cache context. * @throws IgniteCheckedException If failed. */ protected void initPendingTree(GridCacheContext cctx) throws IgniteCheckedException { assert !cctx.group().persistenceEnabled(); if (cctx.affinityNode() && cctx.ttl().eagerTtlEnabled() && pendingEntries == null) { String name = "PendingEntries"; long rootPage = allocateForTree(); pendingEntries = new PendingEntriesTree( grp, name, grp.dataRegion().pageMemory(), rootPage, grp.reuseList(), true); } }
/** {@inheritDoc} */ @Override public ReuseList reuseListForIndex(String idxName) { return grp.reuseList(); }
/** * @return Page ID. * @throws IgniteCheckedException If failed. */ private long allocateForTree() throws IgniteCheckedException { ReuseList reuseList = grp.reuseList(); long pageId; if (reuseList == null || (pageId = reuseList.takeRecycledPage()) == 0L) pageId = grp.dataRegion().pageMemory().allocatePage(grp.groupId(), INDEX_PARTITION, FLAG_IDX); return pageId; }
/** * @param p Partition. * @return Cache data store. * @throws IgniteCheckedException If failed. */ protected CacheDataStore createCacheDataStore0(int p) throws IgniteCheckedException { final long rootPage = allocateForTree(); CacheDataRowStore rowStore = new CacheDataRowStore(grp, grp.freeList(), p); String idxName = treeName(p); CacheDataTree dataTree = new CacheDataTree( grp, idxName, grp.reuseList(), rowStore, rootPage, true); return new CacheDataStoreImpl(p, idxName, rowStore, dataTree); }
/** * @param cctx Cache context. * @throws IgniteCheckedException If failed. */ protected void initPendingTree(GridCacheContext cctx) throws IgniteCheckedException { assert !cctx.group().persistenceEnabled(); if (cctx.affinityNode() && cctx.ttl().eagerTtlEnabled() && pendingEntries == null) { String name = "PendingEntries"; long rootPage = allocateForTree(); pendingEntries = new PendingEntriesTree( grp, name, grp.dataRegion().pageMemory(), rootPage, grp.reuseList(), true); } }