Class PagedQueryHelper
java.lang.Object
com.oracle.coherence.grpc.proxy.common.v0.PagedQueryHelper
A helper class for cache key set and entry set paged queries.
- Since:
- 20.06
- Author:
- Jonathan Knight 2019.11.28
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object[]
decodeCookie
(Service service, com.google.protobuf.ByteString cookie) Decode the binary cookie used in a paged request.static com.google.protobuf.ByteString
encodeCookie
(PartitionSet parts, int page) Encode the opaque cookie used in a paged request.static Stream
<com.oracle.coherence.grpc.messages.cache.v0.EntryResult> entryPagedQuery
(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PageRequest, ?> holder, long cTransferThreshold) Perform a entry set paged query.static Stream
<com.google.protobuf.BytesValue> keysPagedQuery
(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PageRequest, ?> holder, long cTransferThreshold) Perform a key set paged query.
-
Method Details
-
keysPagedQuery
public static Stream<com.google.protobuf.BytesValue> keysPagedQuery(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PageRequest, ?> holder, long cTransferThreshold) Perform a key set paged query.- Parameters:
holder
- theCacheRequestHolder
containing thePageRequest
cTransferThreshold
- the transfer threshold- Returns:
- a
Stream
of serialized cache keys
-
entryPagedQuery
public static Stream<com.oracle.coherence.grpc.messages.cache.v0.EntryResult> entryPagedQuery(CacheRequestHolder<com.oracle.coherence.grpc.messages.cache.v0.PageRequest, ?> holder, long cTransferThreshold) Perform a entry set paged query.- Parameters:
holder
- theCacheRequestHolder
containing thePageRequest
cTransferThreshold
- the transfer threshold- Returns:
- a
Stream
ofEntryResult
instances containing serialized cache entries
-
decodeCookie
Decode the binary cookie used in a paged request.- Parameters:
service
- the cacheService
to use to deserialize the cookiecookie
- the cookie- Returns:
- the decoded cookie
-
encodeCookie
Encode the opaque cookie used in a paged request.- Parameters:
parts
- the partition set to encodepage
- the current page- Returns:
- an encoded page request cookie
-