public class IndexStorageImpl extends Object implements IndexStorage
Modifier and Type | Class and Description |
---|---|
static class |
IndexStorageImpl.MetaStoreInnerIO |
static class |
IndexStorageImpl.MetaStoreLeafIO |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_IDX_NAME_LEN
Max index name length (bytes num)
|
static int |
RESERVED_IDX_NAME_LEN
Reserved size for index name.
|
Constructor and Description |
---|
IndexStorageImpl(PageMemory pageMem,
IgniteWriteAheadLogManager wal,
AtomicLong globalRmvId,
int grpId,
boolean grpShared,
int allocPartId,
byte allocSpace,
ReuseList reuseList,
long rootPageId,
boolean initNew,
FailureProcessor failureProcessor,
PageLockListener lockLsnr) |
Modifier and Type | Method and Description |
---|---|
RootPage |
allocateCacheIndex(Integer cacheId,
String idxName,
int segment)
Allocate page for cache index.
|
RootPage |
allocateIndex(String idxName)
Get or allocate initial page for an index.
|
void |
destroy()
Destroy this meta store.
|
RootPage |
dropCacheIndex(Integer cacheId,
String idxName,
int segment)
Deallocate index page and remove from tree.
|
RootPage |
dropIndex(String idxName)
Deallocate index page and remove from tree.
|
Collection<String> |
getIndexNames() |
boolean |
nameIsAssosiatedWithCache(String idxName,
int cacheId) |
public static final int MAX_IDX_NAME_LEN
public static final int RESERVED_IDX_NAME_LEN
public IndexStorageImpl(PageMemory pageMem, IgniteWriteAheadLogManager wal, AtomicLong globalRmvId, int grpId, boolean grpShared, int allocPartId, byte allocSpace, ReuseList reuseList, long rootPageId, boolean initNew, FailureProcessor failureProcessor, PageLockListener lockLsnr)
pageMem
- Page memory.wal
- Write ahead log manager.public RootPage allocateCacheIndex(Integer cacheId, String idxName, int segment) throws IgniteCheckedException
allocateCacheIndex
in interface IndexStorage
cacheId
- Cache ID.idxName
- Index name.segment
- Segment.IgniteCheckedException
- If failed.public RootPage allocateIndex(String idxName) throws IgniteCheckedException
allocateIndex
in interface IndexStorage
idxName
- Index name.RootPage
that keeps pageId, allocated flag that shows whether the page
was newly allocated, and rootId that is counter which increments each time new page allocated.IgniteCheckedException
- If failed.public RootPage dropCacheIndex(Integer cacheId, String idxName, int segment) throws IgniteCheckedException
dropCacheIndex
in interface IndexStorage
cacheId
- Cache ID.idxName
- Index name.segment
- Segment.IgniteCheckedException
- If failed.public RootPage dropIndex(String idxName) throws IgniteCheckedException
dropIndex
in interface IndexStorage
idxName
- Index name.IgniteCheckedException
- If failed.public void destroy() throws IgniteCheckedException
destroy
in interface IndexStorage
IgniteCheckedException
- If failed.public Collection<String> getIndexNames() throws IgniteCheckedException
getIndexNames
in interface IndexStorage
IgniteCheckedException
- If failed.public boolean nameIsAssosiatedWithCache(String idxName, int cacheId)
nameIsAssosiatedWithCache
in interface IndexStorage
idxName
- Index name to check.cacheId
- Cache id to check.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021