Package com.arpnetworking.tsdcore.sinks
Class HttpPostSink.Builder<B extends BaseSink.Builder<B,S>,S extends HttpPostSink>
java.lang.Object
com.arpnetworking.commons.builder.OvalBuilder<S>
com.arpnetworking.tsdcore.sinks.BaseSink.Builder<B,S>
com.arpnetworking.tsdcore.sinks.HttpPostSink.Builder<B,S>
- Type Parameters:
B
- type of the builderS
- type of the object to be built
- All Implemented Interfaces:
com.arpnetworking.commons.builder.Builder<S>
- Direct Known Subclasses:
AggregationServerHttpSink.Builder
- Enclosing class:
- HttpPostSink
public abstract static class HttpPostSink.Builder<B extends BaseSink.Builder<B,S>,S extends HttpPostSink>
extends BaseSink.Builder<B,S>
Implementation of abstract builder pattern for
HttpPostSink
.- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsetAcceptedStatusCodes
(com.google.common.collect.ImmutableSet<Integer> value) Sets the http status codes accepted as success.setActorSystem
(org.apache.pekko.actor.ActorSystem value) Sets the actor system to create the sink actor in.setMaximumConcurrency
(Integer value) Sets the maximum concurrency of the http requests.setMaximumQueueSize
(Integer value) Sets the maximum pending queue size.setPeriodicMetrics
(com.arpnetworking.metrics.incubator.PeriodicMetrics value) Instance ofPeriodicMetrics
.setSpreadPeriod
(Duration value) Sets the maximum delay before starting to send data to the server.TheURI
to post the aggregated data to.Methods inherited from class com.arpnetworking.tsdcore.sinks.BaseSink.Builder
self, setName
Methods inherited from class com.arpnetworking.commons.builder.OvalBuilder
build, clone, clone, construct, isSelfValidating, toString, validate
-
Constructor Details
-
Builder
Protected constructor for subclasses.- Parameters:
targetConstructor
- The constructor for the concrete type to be created by this builder.
-
-
Method Details
-
setUri
TheURI
to post the aggregated data to. Cannot be null.- Parameters:
value
- TheURI
to post the aggregated data to.- Returns:
- This instance of
HttpPostSink.Builder
.
-
setActorSystem
Sets the actor system to create the sink actor in. Required. Cannot be null. Injected by default.- Parameters:
value
- the actor system- Returns:
- this builder
-
setMaximumConcurrency
Sets the maximum concurrency of the http requests. Optional. Cannot be null. Default is 1. Minimum is 1.- Parameters:
value
- the maximum concurrency- Returns:
- this builder
-
setSpreadPeriod
Sets the maximum delay before starting to send data to the server. Optional. Cannot be null. Default is 0.- Parameters:
value
- the maximum delay before sending new data- Returns:
- this builder
-
setMaximumQueueSize
Sets the maximum pending queue size. Optional Cannot be null. Default is 25000. Minimum is 1.- Parameters:
value
- the maximum pending queue size- Returns:
- this builder
-
setPeriodicMetrics
Instance ofPeriodicMetrics
. Cannot be null. This field may be injected automatically by Jackson/Guice if setup to do so.- Parameters:
value
- Instance ofPeriodicMetrics
.- Returns:
- This instance of
HttpPostSink.Builder
.
-
setAcceptedStatusCodes
Sets the http status codes accepted as success. Optional. Cannot be null. Default is: [200, 201, 202, 204]- Parameters:
value
- the status codes accepted as success- Returns:
- this builder
-