Package org.infinispan.api.mutiny
Interface MutinyQuery<K,V,R>
- Type Parameters:
K
-V
-R
- the result type for the query
public interface MutinyQuery<K,V,R>
Parameterized Query builder
-
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni
<Long> execute()
Executes the manipulation statement (UPDATE, REMOVE)io.smallrye.mutiny.Uni
<MutinyQueryResult<R>> find()
Executes the query<R> io.smallrye.mutiny.Multi
<CacheContinuousQueryEvent<K, R>> Executes the query and returns aMulti
with the resultsMutinyQuery
<K, V, R> limit
(int limit) Limits the number of resultsMutinyQuery
<K, V, R> Sets the named parameter to the specified valuedefault <T> io.smallrye.mutiny.Multi
<CacheEntryProcessorResult<K, T>> process
(CacheProcessor processor) Processes entries matched by the query using a namedCacheProcessor
.<T> io.smallrye.mutiny.Multi
<CacheEntryProcessorResult<K, T>> process
(CacheProcessor processor, CacheProcessorOptions options) Processes entries matched by the query using a namedCacheProcessor
.default <T> io.smallrye.mutiny.Multi
<CacheEntryProcessorResult<K, T>> process
(MutinyCacheEntryProcessor<K, V, T> processor) Processes entries matched by the query using aMutinyCacheEntryProcessor
.<T> io.smallrye.mutiny.Multi
<CacheEntryProcessorResult<K, T>> process
(MutinyCacheEntryProcessor<K, V, T> processor, CacheProcessorOptions options) Processes entries matched by the query using aMutinyCacheEntryProcessor
.MutinyQuery
<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
io.smallrye.mutiny.Uni<MutinyQueryResult<R>> find()Executes the query -
findContinuously
Executes the query and returns aMulti
with the results- Returns:
- a
Multi
which producesCacheContinuousQueryEvent
items.
-
execute
io.smallrye.mutiny.Uni<Long> execute()Executes the manipulation statement (UPDATE, REMOVE)- Returns:
- the number of entries that were processed
-
process
default <T> io.smallrye.mutiny.Multi<CacheEntryProcessorResult<K,T>> process(MutinyCacheEntryProcessor<K, V, T> processor) Processes entries matched by the query using aMutinyCacheEntryProcessor
. The query MUST NOT use projections. If the cache is remote, entries will be retrieved, manipulated locally and put back. The query MUST NOT use projections.- Parameters:
processor
- the entry consumer task
-
process
<T> io.smallrye.mutiny.Multi<CacheEntryProcessorResult<K,T>> process(MutinyCacheEntryProcessor<K, V, T> processor, CacheProcessorOptions options) Processes entries matched by the query using aMutinyCacheEntryProcessor
. The query MUST NOT use projections. If the cache is remote, entries will be retrieved, manipulated locally and put back. The query MUST NOT use projections.- Parameters:
processor
- the entry consumer task
-
process
default <T> io.smallrye.mutiny.Multi<CacheEntryProcessorResult<K,T>> process(CacheProcessor processor) 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> io.smallrye.mutiny.Multi<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:
-