public static class HttpLatencyDetector.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HttpLatencyDetector |
build()
Deprecated.
since 0.12.0; instead use
buildSpec() or directly use EnricherSpec |
EnricherSpec<HttpLatencyDetector> |
buildSpec()
Returns the detector.
|
HttpLatencyDetector.Builder |
noServiceUp()
indicates that the HttpLatencyDetector should not require "service up";
if using this, you must supply a URL sensor or the detector will not know when to run
|
HttpLatencyDetector.Builder |
period(Duration period)
sets how often to test for latency
|
HttpLatencyDetector.Builder |
period(int amount,
java.util.concurrent.TimeUnit unit) |
HttpLatencyDetector.Builder |
rollup(Duration windowSize)
specifies a size of the time window which should be used to give a rolled-up average;
defaults to
HttpLatencyDetector.LATENCY_WINDOW_DEFAULT_PERIOD |
HttpLatencyDetector.Builder |
rollup(int windowSize,
java.util.concurrent.TimeUnit unit)
see
rollup(Duration) |
HttpLatencyDetector.Builder |
rollupOff()
specifies that a rolled-up average should _not_ be calculated and emitted
(defaults to true)
|
HttpLatencyDetector.Builder |
url(AttributeSensor<?> sensor)
supplies a sensor which indicates the URL this should parse (e.g.
|
HttpLatencyDetector.Builder |
url(AttributeSensor<?> sensor,
<any> postProcessing)
supplies a sensor which indicates the URL which this should parse (e.g.
|
HttpLatencyDetector.Builder |
url(java.lang.String url)
supplies a constant URL which should be polled for latency,
where this constant URL is known.
|
HttpLatencyDetector.Builder |
url(java.net.URI uri) |
HttpLatencyDetector.Builder |
url(java.net.URL url) |
public HttpLatencyDetector.Builder noServiceUp()
public HttpLatencyDetector.Builder period(Duration period)
public HttpLatencyDetector.Builder period(int amount, java.util.concurrent.TimeUnit unit)
public HttpLatencyDetector.Builder url(java.lang.String url)
url(AttributeSensor)
is used (but you cannot use both forms)public HttpLatencyDetector.Builder url(java.net.URL url)
url(String)
public HttpLatencyDetector.Builder url(java.net.URI uri)
url(String)
public HttpLatencyDetector.Builder url(AttributeSensor<?> sensor)
public HttpLatencyDetector.Builder url(AttributeSensor<?> sensor, <any> postProcessing)
StringFunctions.append(String)
public HttpLatencyDetector.Builder rollup(Duration windowSize)
HttpLatencyDetector.LATENCY_WINDOW_DEFAULT_PERIOD
public HttpLatencyDetector.Builder rollup(int windowSize, java.util.concurrent.TimeUnit unit)
rollup(Duration)
public HttpLatencyDetector.Builder rollupOff()
@Deprecated public HttpLatencyDetector build()
buildSpec()
or directly use EnricherSpec
Entity#addEnricher(Enricher)
.public EnricherSpec<HttpLatencyDetector> buildSpec()
Entity#addEnricher(EnricherSpec)
EnricherSpec}