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 java.lang.Object
-
-
Method Summary
-
-
-
Method Detail
-
pathParser
public <PATH extends ResourcePath<KEY>,KEY> ScatterGatherHelper.Builder<H,PATH,KEY,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> pathParser(@Nonnull ResourcePathParser<PATH,KEY> pathParser)
-
pathParserExtended
public <PATH extends ResourcePath<KEY>,KEY> ScatterGatherHelper.Builder<H,PATH,KEY,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> pathParserExtended(@Nonnull ExtendedResourcePathParser<PATH,KEY,HTTP_REQUEST> pathParser)
-
roleFinder
public <ROLE> ScatterGatherHelper.Builder<H,P,K,ROLE,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> roleFinder(@Nonnull RoleFinder<ROLE> roleFinder)
-
hostFinder
public <HOST> ScatterGatherHelper.Builder<HOST,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> hostFinder(@Nonnull HostFinder<HOST,R> hostFinder)
-
partitionFinder
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> partitionFinder(@Nonnull AsyncPartitionFinder<K> partitionFinder)
-
partitionFinder
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> partitionFinder(@Nonnull PartitionFinder<K> partitionFinder)
-
partitionFinder
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> partitionFinder(@Nonnull PartitionFinder<K> partitionFinder, java.util.concurrent.Executor executor)
-
hostHealthMonitor
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> hostHealthMonitor(@Nonnull HostHealthMonitor<H> hostHealthMonitor)
-
broadcastMode
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> broadcastMode(@Nonnull ScatterGatherMode broadcastMode)
-
scatterMode
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> scatterMode(@Nonnull ScatterGatherMode scatterMode)
-
dispatchHandler
public <DISPATCH_REQUEST extends BasicRequest,DISPATCH_RESPONSE,DISPATCH_RESPONSE_STATUS> ScatterGatherHelper.Builder<H,P,K,R,DISPATCH_REQUEST,DISPATCH_RESPONSE,DISPATCH_RESPONSE_STATUS> dispatchHandler(@Nonnull PartitionDispatchHandler<H,P,K,DISPATCH_REQUEST,DISPATCH_RESPONSE,DISPATCH_RESPONSE_STATUS> dispatchHandler)
-
responseAggregatorFactory
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> responseAggregatorFactory(@Nonnull ResponseAggregatorFactory<HTTP_REQUEST,HTTP_RESPONSE> responseFactory)
-
requestTimeout
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> requestTimeout(@Nonnull java.util.function.Function<Headers,java.lang.Long> requestTimeout)
-
longTailRetrySupplier
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> longTailRetrySupplier(@Nonnull LongTailRetrySupplier<P,K> longTailRetrySupplier)
-
metricsProvider
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> metricsProvider(@Nonnull java.util.function.Function<BasicRequest,Metrics> metricsProvider)
-
metricsProvider
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> metricsProvider(@Nonnull java.util.function.BiFunction<Headers,Metrics,Headers> metricsDecorator)
-
responseMetrics
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> responseMetrics(@Nonnull java.util.function.Function<Headers,Metrics> responseMetrics)
-
scatterGatherStatsProvider
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> scatterGatherStatsProvider(@Nonnull java.util.function.Function<P,ScatterGatherStats> scatterGatherStatsProvider)
-
defaultTimeoutMillis
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> defaultTimeoutMillis(long defaultTimeoutMillis)
-
dispatchMinimumMillis
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> dispatchMinimumMillis(long dispatchMinimumMillis)
-
longTailMinimumMillis
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> longTailMinimumMillis(long longTailMinimumMillis)
-
enableStackTraceResponseForException
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> enableStackTraceResponseForException(boolean enableStackTraceResponseForException)
-
enableRetryRequestAlwaysUseADifferentHost
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> enableRetryRequestAlwaysUseADifferentHost(boolean enableRetryRequestAlwaysUseADifferentHost)
-
enableRetryRequestAlwaysUseADifferentHost
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> enableRetryRequestAlwaysUseADifferentHost(@Nonnull java.util.function.BooleanSupplier enableRetryRequestAlwaysUseADifferentHost)
-
disableRetryOnTimeout
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> disableRetryOnTimeout(@Nonnull java.util.function.BooleanSupplier disableRetryOnTimeout)
-
setIsReqRedirectionAllowedForQuery
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> setIsReqRedirectionAllowedForQuery(@Nonnull java.util.function.BooleanSupplier isReqRedirectionAllowedForQuery)
-
setSuccessCodePredicate
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> setSuccessCodePredicate(@Nonnull java.util.function.IntPredicate successCodePredicate)
-
setRequestRetriableChecker
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> setRequestRetriableChecker(@Nonnull RequestRetriableChecker<P,R,HTTP_RESPONSE_STATUS> requestRetriableChecker)
-
addBeforeHttpServerCodec
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> addBeforeHttpServerCodec(java.lang.String name, java.util.function.Supplier<?> supplier)
-
addBeforeChunkAggregator
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> addBeforeChunkAggregator(java.lang.String name, java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
-
addBeforeIdleStateHandler
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> addBeforeIdleStateHandler(java.lang.String name, java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
-
addBeforeHttpRequestHandler
public ScatterGatherHelper.Builder<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> addBeforeHttpRequestHandler(java.lang.String name, java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
-
build
public ScatterGatherHelper<H,P,K,R,HTTP_REQUEST,HTTP_RESPONSE,HTTP_RESPONSE_STATUS> build()
-
-