Package com.arpnetworking.tsdcore.sinks
Class TimeThresholdSink.Builder
java.lang.Object
com.arpnetworking.commons.builder.OvalBuilder<S>
com.arpnetworking.tsdcore.sinks.BaseSink.Builder<TimeThresholdSink.Builder,TimeThresholdSink>
com.arpnetworking.tsdcore.sinks.TimeThresholdSink.Builder
- All Implemented Interfaces:
com.arpnetworking.commons.builder.Builder<TimeThresholdSink>
- Enclosing class:
- TimeThresholdSink
public static final class TimeThresholdSink.Builder
extends BaseSink.Builder<TimeThresholdSink.Builder,TimeThresholdSink>
Base
TimeThresholdSink.Builder
implementation.- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot io)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected TimeThresholdSink.Builder
self()
Called by setters to always return appropriate subclass ofBaseSink.Builder
, even from setters of base class.setExcludedServices
(Set<String> value) Sets excluded services.setLogOnly
(Boolean value) Flag to only log violations instead of dropping data.The aggregated data sink to filter.setThreshold
(Duration value) The freshness threshold to log or drop data.Methods inherited from class com.arpnetworking.tsdcore.sinks.BaseSink.Builder
setName
Methods inherited from class com.arpnetworking.commons.builder.OvalBuilder
build, clone, clone, construct, isSelfValidating, toString, validate
-
Constructor Details
-
Builder
public Builder()Public constructor.
-
-
Method Details
-
setSink
The aggregated data sink to filter. Cannot be null.- Parameters:
value
- The aggregated data sink to filter.- Returns:
- This instance of
TimeThresholdSink.Builder
.
-
setExcludedServices
Sets excluded services. Services in this set will never have their data dropped. Optional. Cannot be null. Default is no excluded services.- Parameters:
value
- The excluded services.- Returns:
- This instance of
TimeThresholdSink.Builder
.
-
setLogOnly
Flag to only log violations instead of dropping data. Optional. Defaults to false.- Parameters:
value
- true to log violations, but still pass data- Returns:
- This instance of
TimeThresholdSink.Builder
.
-
setThreshold
The freshness threshold to log or drop data. Required. Cannot be null.- Parameters:
value
- The threshold for accepted data.- Returns:
- This instance of
TimeThresholdSink.Builder
.
-
self
Description copied from class:BaseSink.Builder
Called by setters to always return appropriate subclass ofBaseSink.Builder
, even from setters of base class.- Specified by:
self
in classBaseSink.Builder<TimeThresholdSink.Builder,
TimeThresholdSink> - Returns:
- instance with correct
BaseSink.Builder
class type.
-