public interface GridQueryIndexing
| Modifier and Type | Method and Description |
|---|---|
IndexingQueryFilter |
backupFilter(AffinityTopologyVersion topVer,
int[] parts)
Returns backup filter.
|
void |
cancelAllQueries()
Cancels all executing queries.
|
void |
cancelQueries(Collection<Long> queries)
Cancel specified queries.
|
void |
dynamicAddColumn(String schemaName,
String tblName,
List<QueryField> cols,
boolean ifTblExists,
boolean ifColNotExists)
Add columns to dynamic table.
|
void |
dynamicDropColumn(String schemaName,
String tblName,
List<String> cols,
boolean ifTblExists,
boolean ifColExists)
Drop columns from dynamic table.
|
void |
dynamicIndexCreate(String schemaName,
String tblName,
QueryIndexDescriptorImpl idxDesc,
boolean ifNotExists,
SchemaIndexCacheVisitor cacheVisitor)
Create new index locally.
|
void |
dynamicIndexDrop(String schemaName,
String idxName,
boolean ifExists)
Remove index from the cache.
|
boolean |
isInsertStatement(PreparedStatement nativeStmt)
Check if passed statement is insert statemtn.
|
void |
markForRebuildFromHash(String cacheName)
Marks all indexes of given type for rebuild from hash index, making them unusable until rebuild finishes.
|
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
PreparedStatement |
prepareNativeStatement(String schemaName,
String sql)
Prepare native statement to retrieve JDBC metadata from.
|
<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> |
queryDistributedSql(String schemaName,
String cacheName,
SqlQuery qry,
boolean keepBinary)
Parses SQL query into two step query and executes it.
|
<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> |
queryLocalSql(String schemaName,
String cacheName,
SqlQuery qry,
IndexingQueryFilter filter,
boolean keepBinary)
Executes regular query.
|
FieldsQueryCursor<List<?>> |
queryLocalSqlFields(String schemaName,
SqlFieldsQuery qry,
boolean keepBinary,
IndexingQueryFilter filter,
GridQueryCancel cancel)
Queries individual fields (generally used by JDBC drivers).
|
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
queryLocalText(String schemaName,
String cacheName,
String qry,
String typeName,
IndexingQueryFilter filter)
Executes text query.
|
List<FieldsQueryCursor<List<?>>> |
querySqlFields(String schemaName,
SqlFieldsQuery qry,
boolean keepBinary,
boolean failOnMultipleStmts,
GridQueryCancel cancel)
Detect whether SQL query should be executed in distributed or local manner and execute it.
|
void |
rebuildIndexesFromHash(String cacheName)
Rebuilds all indexes of given type from hash index.
|
void |
registerCache(String cacheName,
String schemaName,
GridCacheContext<?,?> cctx)
Registers cache.
|
boolean |
registerType(GridCacheContext cctx,
GridQueryTypeDescriptor desc)
Registers type if it was not known before or updates it otherwise.
|
void |
remove(GridCacheContext cctx,
GridQueryTypeDescriptor type,
CacheDataRow row)
Removes index entry by key.
|
GridQueryRowCacheCleaner |
rowCacheCleaner(int cacheGroupId)
Return row cache cleaner.
|
Collection<GridRunningQueryInfo> |
runningQueries(long duration)
Collect queries that already running more than specified duration.
|
String |
schema(String cacheName)
Gets database schema from cache name.
|
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.
|
long |
streamUpdateQuery(String schemaName,
String qry,
Object[] params,
IgniteDataStreamer<?,?> streamer)
Perform a MERGE statement using data streamer as receiver.
|
void |
unregisterCache(GridCacheContext cctx,
boolean rmvIdx)
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.<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> queryDistributedSql(String schemaName, String cacheName, SqlQuery qry, boolean keepBinary) throws IgniteCheckedException
schemaName - Schema name.cacheName - Cache name.qry - Query.keepBinary - Keep binary flag.IgniteCheckedException - If failed.List<FieldsQueryCursor<List<?>>> querySqlFields(String schemaName, SqlFieldsQuery qry, boolean keepBinary, boolean failOnMultipleStmts, GridQueryCancel cancel)
schemaName - Schema name.qry - Query.keepBinary - Keep binary flag.failOnMultipleStmts - Whether an exception should be thrown for multiple statements query.cancel - Query cancel state handler.long streamUpdateQuery(String schemaName, String qry, @Nullable Object[] params, IgniteDataStreamer<?,?> streamer) throws IgniteCheckedException
schemaName - Schema name.qry - Query.params - Query parameters.streamer - Data streamer to feed data to.IgniteCheckedException - If failed.<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> queryLocalSql(String schemaName, String cacheName, SqlQuery qry, IndexingQueryFilter filter, boolean keepBinary) throws IgniteCheckedException
schemaName - Schema name.cacheName - Cache name.qry - Query.filter - Cache name and key filter.keepBinary - Keep binary flag. @return Cursor.IgniteCheckedExceptionFieldsQueryCursor<List<?>> queryLocalSqlFields(String schemaName, SqlFieldsQuery qry, boolean keepBinary, IndexingQueryFilter filter, GridQueryCancel cancel) throws IgniteCheckedException
schemaName - Schema name.qry - Query.keepBinary - Keep binary flag.filter - Cache name and key filter.cancel - Query cancel.IgniteCheckedException<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> queryLocalText(String schemaName, String cacheName, String qry, String typeName, IndexingQueryFilter filter) throws IgniteCheckedException
schemaName - Schema name.cacheName - Cache name.qry - Text query.typeName - Type name.filter - Cache name and key filter. @return Queried rows.IgniteCheckedException - If failed.void dynamicIndexCreate(String schemaName, String tblName, QueryIndexDescriptorImpl idxDesc, boolean ifNotExists, SchemaIndexCacheVisitor cacheVisitor) throws IgniteCheckedException
schemaName - Schema name.tblName - Table name.idxDesc - Index descriptor.ifNotExists - Ignore operation if index exists (instead of throwing an error).cacheVisitor - Cache visitorIgniteCheckedException - if failed.void dynamicIndexDrop(String schemaName, String idxName, boolean ifExists) throws IgniteCheckedException
schemaName - Schema name.idxName - Index name.ifExists - Ignore operation if index does not exist (instead of throwing an error).IgniteCheckedException - If failed.void dynamicAddColumn(String schemaName, String tblName, List<QueryField> cols, boolean ifTblExists, boolean ifColNotExists) throws IgniteCheckedException
schemaName - Schema name.tblName - Table name.cols - Columns to add.ifTblExists - Ignore operation if target table does not exist (instead of throwing an error).ifColNotExists - Ignore operation if column already exists (instead of throwing an error) - is honored only
for single column case.IgniteCheckedException - If failed.void dynamicDropColumn(String schemaName, String tblName, List<String> cols, boolean ifTblExists, boolean ifColExists) throws IgniteCheckedException
schemaName - Schema name.tblName - Table name.cols - Columns to drop.ifTblExists - Ignore operation if target table does not exist (instead of throwing an error).ifColExists - Ignore operation if column does not exist (instead of throwing an error) - is honored only
for single column case.IgniteCheckedException - If failed.void registerCache(String cacheName, String schemaName, GridCacheContext<?,?> cctx) throws IgniteCheckedException
cacheName - Cache name.schemaName - Schema name.cctx - Cache context.IgniteCheckedException - If failed.void unregisterCache(GridCacheContext cctx, boolean rmvIdx) throws IgniteCheckedException
cctx - Cache context.rmvIdx - If true, will remove index.IgniteCheckedException - If failed to drop cache schema.boolean registerType(GridCacheContext cctx, GridQueryTypeDescriptor desc) throws IgniteCheckedException
cctx - Cache context.desc - Type descriptor.True if type was registered, false if for some reason it was rejected.IgniteCheckedException - If failed.void 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.void rebuildIndexesFromHash(String cacheName) throws IgniteCheckedException
cacheName - Cache name.IgniteCheckedException - If failed.void markForRebuildFromHash(String cacheName)
cacheName - Cache name.IndexingQueryFilter backupFilter(AffinityTopologyVersion topVer, int[] parts)
topVer - Topology version.parts - Partitions.void onDisconnected(IgniteFuture<?> reconnectFut)
reconnectFut - Reconnect future.PreparedStatement prepareNativeStatement(String schemaName, String sql) throws SQLException
schemaName - Schema name.sql - Query.PreparedStatement from underlying engine to supply metadata to Prepared - most likely H2.SQLExceptionCollection<GridRunningQueryInfo> runningQueries(long duration)
duration - Duration to check.void cancelQueries(Collection<Long> queries)
queries - Queries ID's to cancel.void cancelAllQueries()
String schema(String cacheName)
cacheName - Cache name. null would be converted to an empty string.boolean isInsertStatement(PreparedStatement nativeStmt)
nativeStmt - Native statement.True if insert.GridQueryRowCacheCleaner rowCacheCleaner(int cacheGroupId)
cacheGroupId - Cache group id.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018