public class IgniteH2Indexing extends Object implements GridQueryIndexing
For each registered GridQueryTypeDescriptor this SPI will create respective SQL table with
'_key' and '_val' fields for key and value, and fields from
GridQueryTypeDescriptor.fields().
For each table it will create indexes declared in GridQueryTypeDescriptor.indexes().
| Modifier and Type | Field and Description |
|---|---|
protected GridKernalContext |
ctx |
| Constructor and Description |
|---|
IgniteH2Indexing() |
protected volatile GridKernalContext ctx
public GridKernalContext kernalContext()
public List<JdbcParameterMeta> parameterMetaData(String schemaName, SqlFieldsQuery qry) throws IgniteSQLException
parameterMetaData in interface GridQueryIndexingIgniteSQLExceptionpublic List<GridQueryFieldMetadata> resultMetaData(String schemaName, SqlFieldsQuery qry) throws IgniteSQLException
resultMetaData in interface GridQueryIndexingIgniteSQLExceptionpublic void store(GridCacheContext cctx, GridQueryTypeDescriptor type, CacheDataRow row, @Nullable @Nullable CacheDataRow prevRow, boolean prevRowAvailable) throws IgniteCheckedException
store in interface GridQueryIndexingIgniteCheckedExceptionpublic void remove(GridCacheContext cctx, GridQueryTypeDescriptor type, CacheDataRow row) throws IgniteCheckedException
remove in interface GridQueryIndexingIgniteCheckedExceptionpublic <K,V> GridCloseableIterator<IgniteBiTuple<K,V>> queryLocalText(String schemaName, String cacheName, String qry, String typeName, IndexingQueryFilter filters, int limit) throws IgniteCheckedException
queryLocalText in interface GridQueryIndexingIgniteCheckedExceptionpublic static int operationTimeout(int qryTimeout,
IgniteTxAdapter tx)
qryTimeout - Query timeout in milliseconds.tx - Transaction.public long streamUpdateQuery(String schemaName, String qry, @Nullable @Nullable Object[] params, IgniteDataStreamer<?,?> streamer, String qryInitiatorId) throws IgniteCheckedException
streamUpdateQuery in interface GridQueryIndexingIgniteCheckedExceptionpublic List<Long> streamBatchedUpdateQuery(String schemaName, String qry, List<Object[]> params, SqlClientContext cliCtx, String qryInitiatorId) throws IgniteCheckedException
streamBatchedUpdateQuery in interface GridQueryIndexingIgniteCheckedExceptionpublic ResultSet executeSqlQueryWithTimer(H2PooledConnection conn, String sql, @Nullable @Nullable Collection<Object> params, int timeoutMillis, @Nullable @Nullable GridQueryCancel cancel, Boolean dataPageScanEnabled, H2QueryInfo qryInfo) throws IgniteCheckedException
conn - Connection,sql - Sql query.params - Parameters.timeoutMillis - Query timeout.cancel - Query cancel.dataPageScanEnabled - If data page scan is enabled.IgniteCheckedException - If failed.public void enableDataPageScan(Boolean dataPageScanEnabled)
dataPageScanEnabled - If data page scan is enabled.public ResultSet executeSqlQueryWithTimer(PreparedStatement stmt, H2PooledConnection conn, String sql, int timeoutMillis, @Nullable @Nullable GridQueryCancel cancel, Boolean dataPageScanEnabled, H2QueryInfo qryInfo) throws IgniteCheckedException
stmt - Prepared statement for query.conn - Connection.sql - Sql query.timeoutMillis - Query timeout.cancel - Query cancel.dataPageScanEnabled - If data page scan is enabled.IgniteCheckedException - If failed.public SqlFieldsQuery generateFieldsQuery(String cacheName, SqlQuery qry)
generateFieldsQuery in interface GridQueryIndexingpublic List<FieldsQueryCursor<List<?>>> querySqlFields(String schemaName, SqlFieldsQuery qry, @Nullable @Nullable SqlClientContext cliCtx, boolean keepBinary, boolean failOnMultipleStmts, GridQueryCancel cancel)
querySqlFields in interface GridQueryIndexingpublic void registerQueryStartedListener(Consumer<GridQueryStartedInfo> lsnr)
lsnr - Listener.public boolean unregisterQueryStartedListener(Object lsnr)
lsnr - Listener.public void registerQueryFinishedListener(Consumer<GridQueryFinishedInfo> lsnr)
lsnr - Listener.public boolean unregisterQueryFinishedListener(Object lsnr)
lsnr - Listener.public 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)
executeUpdateOnDataNodeTransactional in interface GridQueryIndexingpublic UpdateResult executeUpdateOnDataNode(String schemaName, SqlFieldsQuery qry, IndexingQueryFilter filter, GridQueryCancel cancel, boolean loc) throws IgniteCheckedException
schemaName - Schema name.qry - Query.filter - Filter.cancel - Cancel state.loc - Locality flag.IgniteCheckedException - if failed.public boolean isStreamableInsertStatement(String schemaName, SqlFieldsQuery qry) throws SQLException
isStreamableInsertStatement in interface GridQueryIndexingSQLExceptionpublic GridSpinBusyLock busyLock()
public GridMapQueryExecutor mapQueryExecutor()
public GridReduceQueryExecutor reduceQueryExecutor()
public RunningQueryManager runningQueryManager()
runningQueryManager in interface GridQueryIndexingpublic void start(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException
start in interface GridQueryIndexingIgniteCheckedExceptionpublic void onMessage(UUID nodeId, Object msg)
nodeId - Node ID.msg - Message.public CacheObjectValueContext objectContext()
public boolean send(Object topic, int topicOrd, Collection<ClusterNode> nodes, Message msg, @Nullable @Nullable IgniteBiClosure<ClusterNode,Message,Message> specialize, @Nullable @Nullable IgniteInClosure2X<ClusterNode,Message> locNodeHnd, byte plc, boolean runLocParallel)
topic - Topic.topicOrd - Topic ordinal for GridTopic.nodes - Nodes.msg - Message.specialize - Optional closure to specialize message for each node.locNodeHnd - Handler for local node.plc - Policy identifying the executor service which will process message.runLocParallel - Run local handler in parallel thread.true If all messages sent successfully.public void stop()
stop in interface GridQueryIndexingpublic void onClientDisconnect()
onClientDisconnect in interface GridQueryIndexingpublic void registerCache(String cacheName, String schemaName, GridCacheContextInfo<?,?> cacheInfo)
registerCache in interface GridQueryIndexingpublic void unregisterCache(GridCacheContextInfo<?,?> cacheInfo)
unregisterCache in interface GridQueryIndexingpublic IndexingQueryFilter backupFilter(@Nullable @Nullable AffinityTopologyVersion topVer, @Nullable @Nullable int[] parts)
backupFilter in interface GridQueryIndexingpublic IndexingQueryFilter backupFilter(@Nullable @Nullable AffinityTopologyVersion topVer, @Nullable @Nullable int[] parts, boolean treatReplicatedAsPartitioned)
topVer - Topology version.parts - Partitions.treatReplicatedAsPartitioned - true if need to treat replicated as partitioned (for outer joins).public AffinityTopologyVersion readyTopologyVersion()
public boolean serverTopologyChanged(AffinityTopologyVersion readyVer)
readyVer - Ready topology version.true If pending distributed exchange exists because server topology is changed.public void awaitForReadyTopologyVersion(AffinityTopologyVersion topVer) throws IgniteCheckedException
topVer - Topology version.IgniteCheckedException - If failed.public void onDisconnected(IgniteFuture<?> reconnectFut)
onDisconnected in interface GridQueryIndexingpublic void onKernalStop()
onKernalStop in interface GridQueryIndexingpublic QueryContextRegistry queryContextRegistry()
public ConnectionManager connections()
public QueryParser parser()
public H2SchemaManager schemaManager()
public PartitionExtractor partitionExtractor()
public PartitionReservationManager partitionReservationManager()
public HeavyQueriesTracker heavyQueriesTracker()
public DistributedIndexingConfiguration distributedConfiguration()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023