Class PagedQueryHelper

java.lang.Object
com.oracle.coherence.grpc.proxy.common.PagedQueryHelper

public final class PagedQueryHelper extends Object
A helper class for cache key set and entry set paged queries.
Since:
20.06
Author:
Jonathan Knight 2019.11.28
  • Method Details

    • keysPagedQuery

      public static Stream<com.google.protobuf.BytesValue> keysPagedQuery(CacheRequestHolder<com.oracle.coherence.grpc.PageRequest,?> holder, long cTransferThreshold)
      Perform a key set paged query.
      Parameters:
      holder - the CacheRequestHolder containing the PageRequest
      cTransferThreshold - the transfer threshold
      Returns:
      a Stream of serialized cache keys
    • entryPagedQuery

      public static Stream<com.oracle.coherence.grpc.EntryResult> entryPagedQuery(CacheRequestHolder<com.oracle.coherence.grpc.PageRequest,?> holder, long cTransferThreshold)
      Perform a entry set paged query.
      Parameters:
      holder - the CacheRequestHolder containing the PageRequest
      cTransferThreshold - the transfer threshold
      Returns:
      a Stream of EntryResult instances containing serialized cache entries
    • decodeCookie

      public static Object[] decodeCookie(Service service, com.google.protobuf.ByteString cookie)
      Decode the binary cookie used in a paged request.
      Parameters:
      service - the cache Service to use to deserialize the cookie
      cookie - the cookie
      Returns:
      the decoded cookie
    • encodeCookie

      public static com.google.protobuf.ByteString encodeCookie(PartitionSet parts, int page)
      Encode the opaque cookie used in a paged request.
      Parameters:
      parts - the partition set to encode
      page - the current page
      Returns:
      an encoded page request cookie