Package com.linkedin.alpini.router.api
Class ScatterGatherHelper.Builder<H,P extends ResourcePath<K>,K,R,HTTP_REQUEST extends BasicRequest,HTTP_RESPONSE,HTTP_RESPONSE_STATUS>
java.lang.Object
com.linkedin.alpini.router.api.ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS>
- Enclosing class:
- ScatterGatherHelper<H,
P extends ResourcePath<K>, K, R, BASIC_HTTP_REQUEST extends BasicRequest, HTTP_RESPONSE, HTTP_RESPONSE_STATUS>
public static class ScatterGatherHelper.Builder<H,P extends ResourcePath<K>,K,R,HTTP_REQUEST extends BasicRequest,HTTP_RESPONSE,HTTP_RESPONSE_STATUS>
extends Object
-
Method Summary
Modifier and TypeMethodDescriptionaddBeforeChunkAggregator
(String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) addBeforeHttpRequestHandler
(String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) addBeforeHttpServerCodec
(String name, Supplier<?> supplier) addBeforeIdleStateHandler
(String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) broadcastMode
(ScatterGatherMode broadcastMode) build()
defaultTimeoutMillis
(long defaultTimeoutMillis) disableRetryOnTimeout
(BooleanSupplier disableRetryOnTimeout) <DISPATCH_REQUEST extends BasicRequest,
DISPATCH_RESPONSE, DISPATCH_RESPONSE_STATUS>
ScatterGatherHelper.Builder<H,P, K, R, DISPATCH_REQUEST, DISPATCH_RESPONSE, DISPATCH_RESPONSE_STATUS> dispatchHandler
(PartitionDispatchHandler<H, P, K, DISPATCH_REQUEST, DISPATCH_RESPONSE, DISPATCH_RESPONSE_STATUS> dispatchHandler) dispatchMinimumMillis
(long dispatchMinimumMillis) enableRetryRequestAlwaysUseADifferentHost
(boolean enableRetryRequestAlwaysUseADifferentHost) enableRetryRequestAlwaysUseADifferentHost
(BooleanSupplier enableRetryRequestAlwaysUseADifferentHost) enableStackTraceResponseForException
(boolean enableStackTraceResponseForException) <HOST> ScatterGatherHelper.Builder<HOST,
P, K, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> hostFinder
(HostFinder<HOST, R> hostFinder) hostHealthMonitor
(HostHealthMonitor<H> hostHealthMonitor) longTailMinimumMillis
(long longTailMinimumMillis) longTailRetrySupplier
(LongTailRetrySupplier<P, K> longTailRetrySupplier) metricsProvider
(BiFunction<Headers, Metrics, Headers> metricsDecorator) metricsProvider
(Function<BasicRequest, Metrics> metricsProvider) partitionFinder
(AsyncPartitionFinder<K> partitionFinder) partitionFinder
(PartitionFinder<K> partitionFinder) partitionFinder
(PartitionFinder<K> partitionFinder, Executor executor) <PATH extends ResourcePath<KEY>,
KEY>
ScatterGatherHelper.Builder<H,PATH, KEY, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> pathParser
(ResourcePathParser<PATH, KEY> pathParser) <PATH extends ResourcePath<KEY>,
KEY>
ScatterGatherHelper.Builder<H,PATH, KEY, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> pathParserExtended
(ExtendedResourcePathParser<PATH, KEY, HTTP_REQUEST> pathParser) requestTimeout
(Function<Headers, Long> requestTimeout) responseAggregatorFactory
(ResponseAggregatorFactory<HTTP_REQUEST, HTTP_RESPONSE> responseFactory) responseMetrics
(Function<Headers, Metrics> responseMetrics) <ROLE> ScatterGatherHelper.Builder<H,
P, K, ROLE, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> roleFinder
(RoleFinder<ROLE> roleFinder) scatterGatherStatsProvider
(Function<P, ScatterGatherStats> scatterGatherStatsProvider) scatterMode
(ScatterGatherMode scatterMode) setIsReqRedirectionAllowedForQuery
(BooleanSupplier isReqRedirectionAllowedForQuery) setRequestRetriableChecker
(RequestRetriableChecker<P, R, HTTP_RESPONSE_STATUS> requestRetriableChecker) setSuccessCodePredicate
(IntPredicate successCodePredicate)
-
Method Details
-
pathParser
public <PATH extends ResourcePath<KEY>,KEY> ScatterGatherHelper.Builder<H,PATH, pathParserKEY, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull ResourcePathParser<PATH, KEY> pathParser) -
pathParserExtended
public <PATH extends ResourcePath<KEY>,KEY> ScatterGatherHelper.Builder<H,PATH, pathParserExtendedKEY, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull ExtendedResourcePathParser<PATH, KEY, HTTP_REQUEST> pathParser) -
roleFinder
public <ROLE> ScatterGatherHelper.Builder<H,P, roleFinderK, ROLE, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull RoleFinder<ROLE> roleFinder) -
hostFinder
public <HOST> ScatterGatherHelper.Builder<HOST,P, hostFinderK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull HostFinder<HOST, R> hostFinder) -
partitionFinder
public ScatterGatherHelper.Builder<H,P, partitionFinderK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull AsyncPartitionFinder<K> partitionFinder) -
partitionFinder
public ScatterGatherHelper.Builder<H,P, partitionFinderK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull PartitionFinder<K> partitionFinder) -
partitionFinder
public ScatterGatherHelper.Builder<H,P, partitionFinderK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull PartitionFinder<K> partitionFinder, Executor executor) -
hostHealthMonitor
public ScatterGatherHelper.Builder<H,P, hostHealthMonitorK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull HostHealthMonitor<H> hostHealthMonitor) -
broadcastMode
public ScatterGatherHelper.Builder<H,P, broadcastModeK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull ScatterGatherMode broadcastMode) -
scatterMode
public ScatterGatherHelper.Builder<H,P, scatterModeK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull ScatterGatherMode scatterMode) -
dispatchHandler
public <DISPATCH_REQUEST extends BasicRequest,DISPATCH_RESPONSE, ScatterGatherHelper.Builder<H,DISPATCH_RESPONSE_STATUS> P, dispatchHandlerK, R, DISPATCH_REQUEST, DISPATCH_RESPONSE, DISPATCH_RESPONSE_STATUS> (@Nonnull PartitionDispatchHandler<H, P, K, DISPATCH_REQUEST, DISPATCH_RESPONSE, DISPATCH_RESPONSE_STATUS> dispatchHandler) -
responseAggregatorFactory
public ScatterGatherHelper.Builder<H,P, responseAggregatorFactoryK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull ResponseAggregatorFactory<HTTP_REQUEST, HTTP_RESPONSE> responseFactory) -
requestTimeout
public ScatterGatherHelper.Builder<H,P, requestTimeoutK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull Function<Headers, Long> requestTimeout) -
longTailRetrySupplier
public ScatterGatherHelper.Builder<H,P, longTailRetrySupplierK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull LongTailRetrySupplier<P, K> longTailRetrySupplier) -
metricsProvider
public ScatterGatherHelper.Builder<H,P, metricsProviderK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull Function<BasicRequest, Metrics> metricsProvider) -
metricsProvider
public ScatterGatherHelper.Builder<H,P, metricsProviderK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull BiFunction<Headers, Metrics, Headers> metricsDecorator) -
responseMetrics
public ScatterGatherHelper.Builder<H,P, responseMetricsK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull Function<Headers, Metrics> responseMetrics) -
scatterGatherStatsProvider
public ScatterGatherHelper.Builder<H,P, scatterGatherStatsProviderK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull Function<P, ScatterGatherStats> scatterGatherStatsProvider) -
defaultTimeoutMillis
public ScatterGatherHelper.Builder<H,P, defaultTimeoutMillisK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (long defaultTimeoutMillis) -
dispatchMinimumMillis
public ScatterGatherHelper.Builder<H,P, dispatchMinimumMillisK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (long dispatchMinimumMillis) -
longTailMinimumMillis
public ScatterGatherHelper.Builder<H,P, longTailMinimumMillisK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (long longTailMinimumMillis) -
enableStackTraceResponseForException
public ScatterGatherHelper.Builder<H,P, enableStackTraceResponseForExceptionK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (boolean enableStackTraceResponseForException) -
enableRetryRequestAlwaysUseADifferentHost
public ScatterGatherHelper.Builder<H,P, enableRetryRequestAlwaysUseADifferentHostK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (boolean enableRetryRequestAlwaysUseADifferentHost) -
enableRetryRequestAlwaysUseADifferentHost
public ScatterGatherHelper.Builder<H,P, enableRetryRequestAlwaysUseADifferentHostK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull BooleanSupplier enableRetryRequestAlwaysUseADifferentHost) -
disableRetryOnTimeout
public ScatterGatherHelper.Builder<H,P, disableRetryOnTimeoutK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull BooleanSupplier disableRetryOnTimeout) -
setIsReqRedirectionAllowedForQuery
public ScatterGatherHelper.Builder<H,P, setIsReqRedirectionAllowedForQueryK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull BooleanSupplier isReqRedirectionAllowedForQuery) -
setSuccessCodePredicate
public ScatterGatherHelper.Builder<H,P, setSuccessCodePredicateK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull IntPredicate successCodePredicate) -
setRequestRetriableChecker
public ScatterGatherHelper.Builder<H,P, setRequestRetriableCheckerK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (@Nonnull RequestRetriableChecker<P, R, HTTP_RESPONSE_STATUS> requestRetriableChecker) -
addBeforeHttpServerCodec
public ScatterGatherHelper.Builder<H,P, addBeforeHttpServerCodecK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (String name, Supplier<?> supplier) -
addBeforeChunkAggregator
public ScatterGatherHelper.Builder<H,P, addBeforeChunkAggregatorK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) -
addBeforeIdleStateHandler
public ScatterGatherHelper.Builder<H,P, addBeforeIdleStateHandlerK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) -
addBeforeHttpRequestHandler
public ScatterGatherHelper.Builder<H,P, addBeforeHttpRequestHandlerK, R, HTTP_REQUEST, HTTP_RESPONSE, HTTP_RESPONSE_STATUS> (String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) -
build
-