public interface GridQueryIndexing
| Modifier and Type | Method and Description |
|---|---|
IndexingQueryFilter |
backupFilter(AffinityTopologyVersion topVer,
int[] parts)
Returns backup filter.
|
UpdateSourceIterator<?> |
executeUpdateOnDataNodeTransactional(GridCacheContext<?,?> cctx,
int[] ids,
int[] parts,
String schema,
String qry,
Object[] params,
int flags,
int pageSize,
int timeout,
AffinityTopologyVersion topVer,
MvccSnapshot mvccSnapshot,
GridQueryCancel cancel) |
SqlFieldsQuery |
generateFieldsQuery(String cacheName,
SqlQuery qry)
Generate SqlFieldsQuery from SqlQuery.
|
boolean |
isStreamableInsertStatement(String schemaName,
SqlFieldsQuery sql)
Whether passed sql statement is single insert statement eligible for streaming.
|
void |
onClientDisconnect()
Performs necessary actions on disconnect of a stateful client (say, one associated with a transaction).
|
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onKernalStop()
Cancels all executing queries.
|
List<JdbcParameterMeta> |
parameterMetaData(String schemaName,
SqlFieldsQuery sql)
Jdbc parameters metadata of the specified query.
|
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
queryLocalText(String schemaName,
String cacheName,
String qry,
String typeName,
IndexingQueryFilter filter,
int limit)
Executes text query.
|
List<FieldsQueryCursor<List<?>>> |
querySqlFields(String schemaName,
SqlFieldsQuery qry,
SqlClientContext cliCtx,
boolean keepBinary,
boolean failOnMultipleStmts,
GridQueryCancel cancel)
Detect whether SQL query should be executed in distributed or local manner and execute it.
|
void |
registerCache(String cacheName,
String schemaName,
GridCacheContextInfo<?,?> cacheInfo)
Registers cache.
|
void |
registerMxBeans(IgniteMBeansManager mbMgr)
Register SQL JMX beans.
|
void |
remove(GridCacheContext cctx,
GridQueryTypeDescriptor type,
CacheDataRow row)
Removes index entry by key.
|
@Nullable List<GridQueryFieldMetadata> |
resultMetaData(String schemaName,
SqlFieldsQuery sql)
Metadata of the result set that is returned if specified query gets executed.
|
RunningQueryManager |
runningQueryManager() |
void |
start(GridKernalContext ctx,
GridSpinBusyLock busyLock)
Starts indexing.
|
void |
stop()
Stops indexing.
|
void |
store(GridCacheContext cctx,
GridQueryTypeDescriptor type,
CacheDataRow row,
CacheDataRow prevRow,
boolean prevRowAvailable)
Updates index.
|
List<Long> |
streamBatchedUpdateQuery(String schemaName,
String qry,
List<Object[]> params,
SqlClientContext cliCtx,
String qryInitiatorId)
Execute a batched INSERT statement using data streamer as receiver.
|
long |
streamUpdateQuery(String schemaName,
String qry,
@Nullable Object[] params,
IgniteDataStreamer<?,?> streamer,
String qryInitiatorId)
Execute an INSERT statement using data streamer as receiver.
|
void |
unregisterCache(GridCacheContextInfo<?,?> cacheInfo)
Unregisters cache.
|
void start(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException
ctx - Context.busyLock - Busy lock.IgniteCheckedException - If failed.void stop() throws IgniteCheckedException
IgniteCheckedException - If failed.void onClientDisconnect()
throws IgniteCheckedException
IgniteCheckedException - If failed.SqlFieldsQuery generateFieldsQuery(String cacheName, SqlQuery qry)
cacheName - Cache name.qry - Query.List<FieldsQueryCursor<List<?>>> querySqlFields(String schemaName, SqlFieldsQuery qry, SqlClientContext cliCtx, boolean keepBinary, boolean failOnMultipleStmts, GridQueryCancel cancel)
schemaName - Schema name.qry - Query.cliCtx - Client context.keepBinary - Keep binary flag.failOnMultipleStmts - Whether an exception should be thrown for multiple statements query.long streamUpdateQuery(String schemaName, String qry, @Nullable @Nullable Object[] params, IgniteDataStreamer<?,?> streamer, String qryInitiatorId) throws IgniteCheckedException
schemaName - Schema name.qry - Query.params - Query parameters.streamer - Data streamer to feed data to.qryInitiatorId - Query initiator ID.IgniteCheckedException - If failed.List<Long> streamBatchedUpdateQuery(String schemaName, String qry, List<Object[]> params, SqlClientContext cliCtx, String qryInitiatorId) throws IgniteCheckedException
schemaName - Schema name.qry - Query.params - Query parameters.cliCtx - Client connection context.qryInitiatorId - Query initiator ID.IgniteCheckedException - If failed.<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> queryLocalText(String schemaName, String cacheName, String qry, String typeName, IndexingQueryFilter filter, int limit) throws IgniteCheckedException
schemaName - Schema name.cacheName - Cache name.qry - Text query.typeName - Type name.filter - Cache name and key filter. @return Queried rows.limit - Limits response records count. If 0 or less, the limit considered to be Integer.MAX_VALUE, that is virtually no limit.IgniteCheckedException - If failed.void registerCache(String cacheName, String schemaName, GridCacheContextInfo<?,?> cacheInfo) throws IgniteCheckedException
cacheName - Cache name.schemaName - Schema name.cacheInfo - Cache context info.IgniteCheckedException - If failed.void unregisterCache(GridCacheContextInfo<?,?> cacheInfo)
cacheInfo - Cache context info.UpdateSourceIterator<?> executeUpdateOnDataNodeTransactional(GridCacheContext<?,?> cctx, int[] ids, int[] parts, String schema, String qry, Object[] params, int flags, int pageSize, int timeout, AffinityTopologyVersion topVer, MvccSnapshot mvccSnapshot, GridQueryCancel cancel) throws IgniteCheckedException
cctx - Cache context.ids - Involved cache ids.parts - Partitions.schema - Schema name.qry - Query string.params - Query parameters.flags - Flags.pageSize - Fetch page size.timeout - Timeout.topVer - Topology version.mvccSnapshot - MVCC snapshot.cancel - Query cancel object.IgniteCheckedException - If failed.List<JdbcParameterMeta> parameterMetaData(String schemaName, SqlFieldsQuery sql) throws IgniteSQLException
schemaName - the default schema name for query.sql - Sql query.SQLException - if failed to get meta.IgniteSQLException@Nullable @Nullable List<GridQueryFieldMetadata> resultMetaData(String schemaName, SqlFieldsQuery sql) throws IgniteSQLException
schemaName - the default schema name for query.sql - Sql query.null if provided query is multi-statement or id it's not a SELECT statement.SQLException - if failed to get meta.IgniteSQLExceptionvoid store(GridCacheContext cctx, GridQueryTypeDescriptor type, CacheDataRow row, CacheDataRow prevRow, boolean prevRowAvailable) throws IgniteCheckedException
cctx - Cache context.type - Type descriptor.row - New row.prevRow - Previous row.prevRowAvailable - Whether previous row is available.IgniteCheckedException - If failed.void remove(GridCacheContext cctx, GridQueryTypeDescriptor type, CacheDataRow row) throws IgniteCheckedException
cctx - Cache context.type - Type descriptor.row - Row.IgniteCheckedException - If failed.IndexingQueryFilter backupFilter(AffinityTopologyVersion topVer, int[] parts)
topVer - Topology version.parts - Partitions.void onDisconnected(IgniteFuture<?> reconnectFut)
reconnectFut - Reconnect future.RunningQueryManager runningQueryManager()
void onKernalStop()
boolean isStreamableInsertStatement(String schemaName, SqlFieldsQuery sql) throws SQLException
schemaName - name of the schema.sql - sql statement.SQLExceptionvoid registerMxBeans(IgniteMBeansManager mbMgr) throws IgniteCheckedException
mbMgr - Ignite MXBean manager.IgniteCheckedException - On bean registration error.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023