Package org.infinispan.api.async
Interface AsyncQuery<K,V,R>
- Type Parameters:
K
-V
-R
- the result type for the query
public interface AsyncQuery<K,V,R>
Parameterized Query builder
- Since:
- 14.0
-
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the manipulation statement (UPDATE, REMOVE)find()
Executes the queryfindContinuously
(String query) Executes the query and returns aFlow.Publisher
with the resultsAsyncQuery<K,
V, R> limit
(int limit) Limits the number of resultsAsyncQuery<K,
V, R> Sets the named parameter to the specified valuedefault <T> Flow.Publisher<CacheEntryProcessorResult<K,
T>> process
(AsyncCacheEntryProcessor<K, V, T> processor) <T> Flow.Publisher<CacheEntryProcessorResult<K,
T>> process
(AsyncCacheEntryProcessor<K, V, T> processor, CacheProcessorOptions options) default <T> Flow.Publisher<CacheEntryProcessorResult<K,
T>> process
(CacheProcessor processor) Processes entries matched by the query using a namedCacheProcessor
.<T> Flow.Publisher<CacheEntryProcessorResult<K,
T>> process
(CacheProcessor processor, CacheProcessorOptions options) Processes entries matched by the query using a namedCacheProcessor
.AsyncQuery<K,
V, R> skip
(long skip) Skips the first specified number of results
-
Method Details
-
param
Sets the named parameter to the specified value- Parameters:
name
-value
-- Returns:
-
skip
Skips the first specified number of results- Parameters:
skip
-- Returns:
-
limit
Limits the number of results- Parameters:
limit
-- Returns:
-
find
CompletionStage<AsyncQueryResult<R>> find()Executes the query -
findContinuously
Executes the query and returns aFlow.Publisher
with the results- Parameters:
query
- query String- Returns:
- a
Flow.Publisher
which producesCacheContinuousQueryEvent
items.
-
execute
CompletionStage<Long> execute()Executes the manipulation statement (UPDATE, REMOVE)- Returns:
- the number of entries that were processed
-
process
default <T> Flow.Publisher<CacheEntryProcessorResult<K,T>> process(AsyncCacheEntryProcessor<K, V, T> processor) - Type Parameters:
T
-- Parameters:
processor
- the entry processor task- Returns:
-
process
<T> Flow.Publisher<CacheEntryProcessorResult<K,T>> process(AsyncCacheEntryProcessor<K, V, T> processor, CacheProcessorOptions options) - Type Parameters:
T
-- Parameters:
processor
- the entry processor taskoptions
-- Returns:
-
process
Processes entries matched by the query using a namedCacheProcessor
. The query MUST NOT use projections. If the cache processor returns a non-null value for an entry, it will be returned through the publisher.- Type Parameters:
T
-- Parameters:
processor
- the entry processor- Returns:
-
process
<T> Flow.Publisher<CacheEntryProcessorResult<K,T>> process(CacheProcessor processor, CacheProcessorOptions options) Processes entries matched by the query using a namedCacheProcessor
. The query MUST NOT use projections. If the cache processor returns a non-null value for an entry, it will be returned through the publisher.- Type Parameters:
T
-- Parameters:
processor
- the named entry processoroptions
-- Returns:
-