Package org.infinispan.api.sync
Interface SyncQuery<K,V,R>
- Type Parameters:
K
-V
-R
- the result type for the query
public interface SyncQuery<K,V,R>
Parameterized Query builder
-
Method Summary
Modifier and TypeMethodDescriptionint
execute()
Executes the manipulation statement (UPDATE, REMOVE)find()
Executes the query<R> AutoCloseable
findContinuously
(SyncCacheContinuousQueryListener<K, V> listener) Continuously listen on querylimit
(int limit) Limits the number of resultsSets the named parameter to the specified valueprocess
(CacheProcessor processor) Processes entries matched by the query using a namedCacheProcessor
.process
(CacheProcessor processor, CacheProcessorOptions options) Processes entries matched by the query using a namedCacheProcessor
.process
(SyncCacheEntryProcessor<K, V, T> processor) Processes entries using anSyncCacheEntryProcessor
.process
(SyncCacheEntryProcessor<K, V, T> processor, CacheProcessorOptions options) Processes entries using aSyncCacheEntryProcessor
.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
SyncQueryResult<R> find()Executes the query -
findContinuously
Continuously listen on query- Type Parameters:
R
-- Parameters:
listener
-- Returns:
- A
AutoCloseable
that allows to remove the listener viaAutoCloseable.close()
.
-
execute
int execute()Executes the manipulation statement (UPDATE, REMOVE)- Returns:
- the number of entries that were processed
-
process
Processes entries using anSyncCacheEntryProcessor
. If the cache is embedded, the consumer will be executed locally on the owner of the entry. If the cache is remote, entries will be retrieved, manipulated locally and put back. The query MUST NOT use projections.- Parameters:
processor
- the entry processor
-
process
Processes entries using aSyncCacheEntryProcessor
. If the cache is embedded, the consumer will be executed locally on the owner of the entry. If the cache is remote, entries will be retrieved, manipulated locally and put back. The query MUST NOT use projections.- Type Parameters:
T
-- Parameters:
processor
- the entry processoroptions
-
-
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 as an entry of aMap
.- Parameters:
processor
- the entry processor- 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 as an entry of aMap
.- Type Parameters:
T
-- Parameters:
processor
- the named entry processoroptions
-- Returns:
-