public static class GetFeedRequest.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
GetFeedRequest |
build() |
GetFeedRequest.Builder |
withEagerFetching(boolean eagerFetching) |
GetFeedRequest.Builder |
withFeed(String feedName) |
GetFeedRequest.Builder |
withLimit(int limit) |
GetFeedRequest.Builder |
withPartitioning(int partitionCount,
int partitionNumber)
Partitioned feeding enables parallel processing of events.
|
GetFeedRequest.Builder |
withSubscriptionPollDelay(Duration pollDelay) |
GetFeedRequest.Builder |
withTenantId(UUID tenantId) |
GetFeedRequest.Builder |
withTypes(String... types) |
GetFeedRequest.Builder |
withWaitTime(Duration waitTime) |
public GetFeedRequest.Builder withTypes(String... types)
types - Aggregate types to filter (include) when requesting the _all feed.public GetFeedRequest.Builder withFeed(String feedName)
feedName - Name of feed to requestpublic GetFeedRequest.Builder withTenantId(UUID tenantId)
public GetFeedRequest.Builder withLimit(int limit)
limit - Maximum number of returned feed entries per server response.public GetFeedRequest.Builder withEagerFetching(boolean eagerFetching)
eagerFetching - True if the client should continue to fetch event within the same poll as long as there
are more available. Default is true.public GetFeedRequest.Builder withSubscriptionPollDelay(Duration pollDelay)
pollDelay - Desired delay between feed polls. Must be between 1s and 60s. Default is 1s.public GetFeedRequest.Builder withWaitTime(Duration waitTime)
waitTime - If set to greater than 0, long polling will be enabled and each poll request will
hang either until a new entry was added to the feed or until the request times out.
Value must be between 0s and 60s, default is 0s.public GetFeedRequest.Builder withPartitioning(int partitionCount, int partitionNumber)
partitionCount - The expected total number of partitions, i.e. the total number of consumers feeding in parallel.partitionNumber - The number of the partition to request.
Eg. if the partitionCount is set to '2' the partition '0' and '1' can be fetched by two feeding consumer respectively.public GetFeedRequest build()
Copyright © 2021. All rights reserved.