public interface GridQueryIndexing
| Modifier and Type | Method and Description |
|---|---|
IndexingQueryFilter |
backupFilter(List<String> caches,
AffinityTopologyVersion topVer,
int[] parts)
Returns backup filter.
|
boolean |
isGeometryClass(Class<?> cls)
Checks if the given class is GEOMETRY.
|
boolean |
isSqlType(Class<?> cls)
Checks if the given class can be mapped to a simple SQL type.
|
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.
|
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
query(String spaceName,
String qry,
Collection<Object> params,
GridQueryTypeDescriptor type,
IndexingQueryFilter filters)
Executes regular query.
|
GridQueryFieldsResult |
queryFields(String spaceName,
String qry,
Collection<Object> params,
IndexingQueryFilter filters)
Queries individual fields (generally used by JDBC drivers).
|
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
queryText(String spaceName,
String qry,
GridQueryTypeDescriptor type,
IndexingQueryFilter filters)
Executes text query.
|
Iterable<List<?>> |
queryTwoStep(GridCacheContext<?,?> cctx,
GridCacheTwoStepQuery qry,
boolean keepCacheObjects)
Runs two step query.
|
QueryCursor<List<?>> |
queryTwoStep(GridCacheContext<?,?> cctx,
SqlFieldsQuery qry)
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(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.
|
long |
size(String spaceName,
GridQueryTypeDescriptor desc,
IndexingQueryFilter filters)
Gets size of index for given type or -1 if it is a unknown type.
|
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.
|
void |
unregisterCache(CacheConfiguration<?,?> ccfg)
Deregisters 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.Iterable<List<?>> queryTwoStep(GridCacheContext<?,?> cctx, GridCacheTwoStepQuery qry, boolean keepCacheObjects)
cctx - Cache context.qry - Query.keepCacheObjects - If true, cache objects representation will be preserved.QueryCursor<List<?>> queryTwoStep(GridCacheContext<?,?> cctx, SqlFieldsQuery qry)
cctx - Cache context.qry - Query.<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> queryTwoStep(GridCacheContext<?,?> cctx, SqlQuery qry)
cctx - Cache context.qry - Query.GridQueryFieldsResult queryFields(@Nullable String spaceName, String qry, Collection<Object> params, IndexingQueryFilter filters) throws IgniteCheckedException
spaceName - Space name.qry - Query.params - Query parameters.filters - Space name and key filters.IgniteCheckedException - If failed.<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> query(@Nullable String spaceName, String qry, Collection<Object> params, GridQueryTypeDescriptor type, IndexingQueryFilter filters) throws IgniteCheckedException
spaceName - Space name.qry - Query.params - Query parameters.type - Query return type.filters - Space name and key filters.IgniteCheckedException - If failed.<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> queryText(@Nullable String spaceName, String qry, GridQueryTypeDescriptor type, IndexingQueryFilter filters) throws IgniteCheckedException
spaceName - Space name.qry - Text query.type - Query return type.filters - Space name and key filter.IgniteCheckedException - If failed.long size(@Nullable String spaceName, GridQueryTypeDescriptor desc, IndexingQueryFilter filters) throws IgniteCheckedException
spaceName - Space name.desc - Type descriptor.filters - Filters.IgniteCheckedException - If failed.void registerCache(CacheConfiguration<?,?> ccfg) throws IgniteCheckedException
ccfg - Cache configuration.IgniteCheckedException - If failed.void unregisterCache(CacheConfiguration<?,?> ccfg) throws IgniteCheckedException
ccfg - Cache configuration.IgniteCheckedException - If failed to drop cache schema.boolean isSqlType(Class<?> cls)
cls - Class.true If can.boolean isGeometryClass(Class<?> cls)
cls - Class.true If this is geometry.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(List<String> caches, AffinityTopologyVersion topVer, int[] parts)
caches - List of caches.topVer - Topology version.parts - Partitions.void onDisconnected(IgniteFuture<?> reconnectFut)
reconnectFut - Reconnect future.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015