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 Details

    • param

      SyncQuery<K,V,R> param(String name, Object value)
      Sets the named parameter to the specified value
      Parameters:
      name -
      value -
      Returns:
    • skip

      SyncQuery<K,V,R> skip(long skip)
      Skips the first specified number of results
      Parameters:
      skip -
      Returns:
    • limit

      SyncQuery<K,V,R> limit(int limit)
      Limits the number of results
      Parameters:
      limit -
      Returns:
    • find

      Executes the query
    • findContinuously

      <R> AutoCloseable findContinuously(SyncCacheContinuousQueryListener<K,V> listener)
      Continuously listen on query
      Type Parameters:
      R -
      Parameters:
      listener -
      Returns:
      A AutoCloseable that allows to remove the listener via AutoCloseable.close().
    • execute

      int execute()
      Executes the manipulation statement (UPDATE, REMOVE)
      Returns:
      the number of entries that were processed
    • process

      default <T> Map<K,T> process(SyncCacheEntryProcessor<K,V,T> processor)
      Processes entries using an SyncCacheEntryProcessor. 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

      <T> Map<K,T> process(SyncCacheEntryProcessor<K,V,T> processor, CacheProcessorOptions options)
      Processes entries using a SyncCacheEntryProcessor. 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 processor
      options -
    • process

      default <T> Map<K,T> process(CacheProcessor processor)
      Processes entries matched by the query using a named CacheProcessor. 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 a Map.
      Parameters:
      processor - the entry processor
      Returns:
    • process

      <T> Map<K,T> process(CacheProcessor processor, CacheProcessorOptions options)
      Processes entries matched by the query using a named CacheProcessor. 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 a Map.
      Type Parameters:
      T -
      Parameters:
      processor - the named entry processor
      options -
      Returns: