public class IndexProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static Class<? extends IndexesRebuildTask> |
idxRebuildCls
For tests to emulate long rebuild process.
|
static JavaObjectKeySerializer |
serializer
Serializer for representing JO as byte array in inline.
|
ctx, diagnosticLog, log| Constructor and Description |
|---|
IndexProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
Index |
createIndex(GridCacheContext<?,?> cctx,
IndexFactory factory,
IndexDefinition definition)
Creates a new index.
|
Index |
createIndexDynamically(GridCacheContext cctx,
IndexFactory factory,
IndexDefinition definition,
SchemaIndexCacheVisitor cacheVisitor)
Creates a new index.
|
void |
defragment(CacheGroupContext grpCtx,
CacheGroupContext newCtx,
PageMemoryEx partPageMem,
IntMap<LinkMap> mappingByPart,
CheckpointTimeoutLock cpLock,
Runnable cancellationChecker,
IgniteThreadPoolExecutor defragmentationThreadPool)
Defragment index partition.
|
void |
destroyOrphanIndex(GridKernalContext ctx,
RootPage page,
String indexName,
int grpId,
PageMemory pageMemory,
GridAtomicLong removeId,
ReuseList reuseList,
boolean mvccEnabled)
Destroy founded index which belongs to stopped cache.
|
IndexesRebuildTask |
idxRebuild() |
IndexRowCacheRegistry |
idxRowCacheRegistry()
Index row cache registry.
|
@Nullable Index |
index(IndexName idxName)
Returns index for specified name.
|
IndexDefinition |
indexDefinition(UUID idxId)
Returns IndexDefinition used for creating index specified id.
|
Collection<Index> |
indexes(String cacheName)
Returns collection of indexes for specified cache.
|
IndexKeyTypeSettings |
keyTypeSettings() |
IgniteLogger |
logger() |
void |
markRebuildIndexesForCache(GridCacheContext<?,?> cctx,
boolean val)
Mark/unmark for rebuild indexes for a specific cache.
|
@Nullable IgniteInternalFuture<?> |
rebuildIndexesForCache(GridCacheContext<?,?> cctx,
boolean force,
IndexRebuildCancelToken cancelTok)
Start rebuild of indexes for specified cache.
|
static void |
registerIO()
Register inline IOs for sorted indexes.
|
void |
remove(String cacheName,
@Nullable CacheDataRow prevRow)
Delete specified row from index.
|
void |
removeIndex(IndexName idxName,
boolean softDelete)
Removes an index.
|
IndexRowCache |
rowCacheCleaner(int grpId)
Index row cache.
|
Map<String,Integer> |
secondaryIndexesInlineSize()
Information about secondary indexes efficient (actual) inline size.
|
void |
store(Collection<? extends Index> idxs,
CacheDataRow newRow,
@Nullable CacheDataRow prevRow,
boolean prevRowAvailable)
Updates index with new row.
|
void |
store(GridCacheContext<?,?> cctx,
CacheDataRow newRow,
@Nullable CacheDataRow prevRow,
boolean prevRowAvailable)
Updates index with new row.
|
List<InlineIndex> |
treeIndexes(String cacheName,
boolean createdOnly)
Collect indexes for rebuild.
|
void |
unregisterCache(GridCacheContextInfo cacheInfo)
Unregisters cache.
|
boolean |
useUnwrappedPk(GridCacheContext<?,?> cctx,
String treeName) |
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop, toString, validateNode, validateNodepublic static Class<? extends IndexesRebuildTask> idxRebuildCls
public static JavaObjectKeySerializer serializer
public IndexProcessor(GridKernalContext ctx) throws IgniteCheckedException
ctx - Kernal context.IgniteCheckedExceptionpublic static void registerIO()
public void store(GridCacheContext<?,?> cctx, CacheDataRow newRow, @Nullable @Nullable CacheDataRow prevRow, boolean prevRowAvailable) throws IgniteSpiException
cctx - Cache context.newRow - cache row to store in index.prevRow - optional cache row that will be replaced with new row.IgniteSpiExceptionpublic void store(Collection<? extends Index> idxs, CacheDataRow newRow, @Nullable @Nullable CacheDataRow prevRow, boolean prevRowAvailable) throws IgniteSpiException
idxs - List of indexes to update.newRow - cache row to store in index.prevRow - optional cache row that will be replaced with new row.IgniteSpiExceptionpublic void remove(String cacheName, @Nullable @Nullable CacheDataRow prevRow) throws IgniteSpiException
cacheName - Cache name.prevRow - Cache row to delete from index.IgniteSpiExceptionpublic Index createIndexDynamically(GridCacheContext cctx, IndexFactory factory, IndexDefinition definition, SchemaIndexCacheVisitor cacheVisitor)
cctx - Cache context.factory - Index factory.definition - Description of an index to create.cacheVisitor - Enable to cancel dynamic index populating.public Index createIndex(GridCacheContext<?,?> cctx, IndexFactory factory, IndexDefinition definition)
cctx - Cache context.factory - Index factory.definition - Description of an index to create.public void removeIndex(IndexName idxName, boolean softDelete)
idxName - Index name.softDelete - whether it's required to delete underlying structures.public IndexRowCache rowCacheCleaner(int grpId)
grpId - Cache group id.public IndexRowCacheRegistry idxRowCacheRegistry()
public void markRebuildIndexesForCache(GridCacheContext<?,?> cctx, boolean val)
@Nullable public @Nullable IgniteInternalFuture<?> rebuildIndexesForCache(GridCacheContext<?,?> cctx, boolean force, IndexRebuildCancelToken cancelTok)
cctx - Cache context.force - Force rebuild indexes.public IndexesRebuildTask idxRebuild()
public Collection<Index> indexes(String cacheName)
cacheName - Cache name.@Nullable public @Nullable Index index(IndexName idxName)
idxName - Index name.null if not found.public IndexDefinition indexDefinition(UUID idxId)
idxId - UUID of index.idxId.public void unregisterCache(GridCacheContextInfo cacheInfo)
cacheInfo - Cache context info.public void destroyOrphanIndex(GridKernalContext ctx, RootPage page, String indexName, int grpId, PageMemory pageMemory, GridAtomicLong removeId, ReuseList reuseList, boolean mvccEnabled) throws IgniteCheckedException
page - Root page.indexName - Index name.grpId - Group id which contains garbage.pageMemory - Page memory to work with.removeId - Global remove id.reuseList - Reuse list where free pages should be stored.mvccEnabled - Whether mvcc is enabled.IgniteCheckedException - If failed.public IndexKeyTypeSettings keyTypeSettings()
public boolean useUnwrappedPk(GridCacheContext<?,?> cctx, String treeName)
true In case of use an unwrapped PK for the index.public void defragment(CacheGroupContext grpCtx, CacheGroupContext newCtx, PageMemoryEx partPageMem, IntMap<LinkMap> mappingByPart, CheckpointTimeoutLock cpLock, Runnable cancellationChecker, IgniteThreadPoolExecutor defragmentationThreadPool) throws IgniteCheckedException
grpCtx - Old group context.newCtx - New group context.partPageMem - Partition page memory.mappingByPart - Mapping page memory.cpLock - Defragmentation checkpoint read lock.cancellationChecker - Cancellation checker.defragmentationThreadPool - Thread pool for defragmentation.IgniteCheckedException - If failed.public List<InlineIndex> treeIndexes(String cacheName, boolean createdOnly)
cacheName - Cache name.createdOnly - Get only created indexes (not restored from dick).public IgniteLogger logger()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023