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.
|
IgniteDataStreamer<?,?> |
createStreamer(String spaceName,
PreparedStatement nativeStmt,
long autoFlushFreq,
int nodeBufSize,
int nodeParOps,
boolean allowOverwrite) |
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onSwap(String spaceName,
CacheObject key)
Will be called when entry with given key is swapped.
|
void |
onUnswap(String spaceName,
CacheObject key,
CacheObject val)
Will be called when entry with given key is unswapped.
|
PreparedStatement |
prepareNativeStatement(String schema,
String sql)
Prepare native statement to retrieve JDBC metadata from.
|
<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> |
queryLocalSql(GridCacheContext<?,?> cctx,
SqlQuery qry,
IndexingQueryFilter filter,
boolean keepBinary)
Executes regular query.
|
<K,V> QueryCursor<List<?>> |
queryLocalSqlFields(GridCacheContext<?,?> cctx,
SqlFieldsQuery qry,
IndexingQueryFilter filter,
GridQueryCancel cancel)
Queries individual fields (generally used by JDBC drivers).
|
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
queryLocalText(String spaceName,
String qry,
GridQueryTypeDescriptor type,
IndexingQueryFilter filter)
Executes text query.
|
QueryCursor<List<?>> |
queryTwoStep(GridCacheContext<?,?> cctx,
SqlFieldsQuery qry,
GridQueryCancel cancel)
Parses SQL query into two step query and executes it.
|
<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> |
queryTwoStep(GridCacheContext<?,?> cctx,
SqlQuery qry)
Parses SQL query into two step query and executes it.
|
void |
rebuildIndexes(String spaceName,
GridQueryTypeDescriptor type)
Rebuilds all indexes of given type.
|
void |
registerCache(GridCacheContext<?,?> cctx,
CacheConfiguration<?,?> ccfg)
Registers cache.
|
boolean |
registerType(String spaceName,
GridQueryTypeDescriptor desc)
Registers type if it was not known before or updates it otherwise.
|
void |
remove(String spaceName,
CacheObject key,
CacheObject val)
Removes index entry by key.
|
Collection<GridRunningQueryInfo> |
runningQueries(long duration)
Collect queries that already running more than specified duration.
|
String |
space(String schemaName)
Gets space name from database schema.
|
void |
start(GridKernalContext ctx,
GridSpinBusyLock busyLock)
Starts indexing.
|
void |
stop()
Stops indexing.
|
void |
store(String spaceName,
GridQueryTypeDescriptor type,
CacheObject key,
CacheObject val,
byte[] ver,
long expirationTime)
Updates index.
|
long |
streamUpdateQuery(String spaceName,
String qry,
Object[] params,
IgniteDataStreamer<?,?> streamer)
Perform a MERGE statement using data streamer as receiver.
|
void |
unregisterCache(CacheConfiguration<?,?> ccfg)
Unregisters cache.
|
void |
unregisterType(String spaceName,
GridQueryTypeDescriptor type)
Unregisters type and removes all corresponding data.
|
void start(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException
ctx - Context.busyLock - Busy lock.IgniteCheckedException - If failed.void stop()
throws IgniteCheckedException
IgniteCheckedException - If failed.QueryCursor<List<?>> queryTwoStep(GridCacheContext<?,?> cctx, SqlFieldsQuery qry, GridQueryCancel cancel) throws IgniteCheckedException
cctx - Cache context.qry - Query.cancel - Query cancel.IgniteCheckedException - If failed.<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> queryTwoStep(GridCacheContext<?,?> cctx, SqlQuery qry) throws IgniteCheckedException
cctx - Cache context.qry - Query.IgniteCheckedException - If failed.<K,V> QueryCursor<List<?>> queryLocalSqlFields(GridCacheContext<?,?> cctx, SqlFieldsQuery qry, IndexingQueryFilter filter, GridQueryCancel cancel) throws IgniteCheckedException
cctx - Cache context.qry - Query.filter - Space name and key filter.cancel - Query cancel.IgniteCheckedExceptionlong streamUpdateQuery(@Nullable
String spaceName,
String qry,
@Nullable
Object[] params,
IgniteDataStreamer<?,?> streamer)
throws IgniteCheckedException
spaceName - Space 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(GridCacheContext<?,?> cctx, SqlQuery qry, IndexingQueryFilter filter, boolean keepBinary) throws IgniteCheckedException
cctx - Cache context.qry - Query.filter - Space name and key filter.keepBinary - Keep binary flag.IgniteCheckedException<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> queryLocalText(@Nullable String spaceName, String qry, GridQueryTypeDescriptor type, IndexingQueryFilter filter) throws IgniteCheckedException
spaceName - Space name.qry - Text query.type - Query return type.filter - Space name and key filter.IgniteCheckedException - If failed.void registerCache(GridCacheContext<?,?> cctx, CacheConfiguration<?,?> ccfg) throws IgniteCheckedException
cctx - Cache context.ccfg - Cache configuration.IgniteCheckedException - If failed.void unregisterCache(CacheConfiguration<?,?> ccfg) throws IgniteCheckedException
ccfg - Cache configuration.IgniteCheckedException - If failed to drop cache schema.boolean registerType(@Nullable
String spaceName,
GridQueryTypeDescriptor desc)
throws IgniteCheckedException
spaceName - Space name.desc - Type descriptor.True if type was registered, false if for some reason it was rejected.IgniteCheckedException - If failed.void unregisterType(@Nullable
String spaceName,
GridQueryTypeDescriptor type)
throws IgniteCheckedException
spaceName - Space name.type - Type descriptor.IgniteCheckedException - If failed.void store(@Nullable
String spaceName,
GridQueryTypeDescriptor type,
CacheObject key,
CacheObject val,
byte[] ver,
long expirationTime)
throws IgniteCheckedException
spaceName - Space name.type - Value type.key - Key.val - Value.ver - Version.expirationTime - Expiration time or 0 if never expires.IgniteCheckedException - If failed.void remove(@Nullable
String spaceName,
CacheObject key,
CacheObject val)
throws IgniteCheckedException
spaceName - Space name.key - Key.val - Value.IgniteCheckedException - If failed.void onSwap(@Nullable
String spaceName,
CacheObject key)
throws IgniteCheckedException
spaceName - Space name.key - Key.IgniteCheckedException - If failed.void onUnswap(@Nullable
String spaceName,
CacheObject key,
CacheObject val)
throws IgniteCheckedException
spaceName - Space name.key - Key.val - Value.IgniteCheckedException - If failed.void rebuildIndexes(@Nullable
String spaceName,
GridQueryTypeDescriptor type)
spaceName - Space name.type - Type descriptor.IndexingQueryFilter backupFilter(AffinityTopologyVersion topVer, int[] parts)
topVer - Topology version.parts - Partitions.void onDisconnected(IgniteFuture<?> reconnectFut)
reconnectFut - Reconnect future.PreparedStatement prepareNativeStatement(String schema, String sql) throws SQLException
schema - Schema.sql - Query.PreparedStatement from underlying engine to supply metadata to Prepared - most likely H2.SQLExceptionString space(String schemaName)
schemaName - Schema name. Could not be null. Could be empty.Collection<GridRunningQueryInfo> runningQueries(long duration)
duration - Duration to check.void cancelQueries(Collection<Long> queries)
queries - Queries ID's to cancel.void cancelAllQueries()
IgniteDataStreamer<?,?> createStreamer(String spaceName, PreparedStatement nativeStmt, long autoFlushFreq, int nodeBufSize, int nodeParOps, boolean allowOverwrite)
spaceName - Space name.nativeStmt - Native statement.autoFlushFreq - Automatic data flushing frequency, disabled if 0.nodeBufSize - Per node buffer size - see IgniteDataStreamer.perNodeBufferSize(int)nodeParOps - Per node parallel ops count - see IgniteDataStreamer.perNodeParallelOperations(int)allowOverwrite - Overwrite existing cache values on key duplication.IgniteDataStreamer tailored to specific needs of given native statement based on its metadata;
null if given statement is a query.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.9.0 Release Date : March 2 2017