Brooklyn

brooklyn.enricher
[Java] Class HttpLatencyDetector.Builder

java.lang.Object
  brooklyn.enricher.HttpLatencyDetector.Builder

public static class HttpLatencyDetector.Builder

Method Summary
HttpLatencyDetector build()

returns the detector. note that callers should then add this to the entity, typically using Entity.addEnricher

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

Builder period(int amount, java.util.concurrent.TimeUnit unit)

Builder rollup(int windowSize, java.util.concurrent.TimeUnit unit)

specifies a size of the time window which should be used to give a rolled-up average; defaults to HttpLatencyDetector#LATENCY_WINDOW_DEFAULT_PERIOD#LATENCY_WINDOW_DEFAULT_PERIOD

Builder rollupOff()

specifies that a rolled-up average should _not_ be calculated and emitted (defaults to true)

Builder url(java.lang.String url)

supplies a constant URL which should be polled for latency, where this constant URL is known. typically the alternative url(AttributeSensor) is used (but you cannot use both forms)

Builder url(AttributeSensor sensor)

supplies a sensor which indicates the URL this should parse (e.g.

Builder url(AttributeSensor sensor, Function postProcessing)

supplies a sensor which indicates the URL which this should parse (e.g.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

build

public HttpLatencyDetector build()
returns the detector. note that callers should then add this to the entity, typically using Entity.addEnricher


noServiceUp

public 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


period

public Builder period(int amount, java.util.concurrent.TimeUnit unit)


rollup

public Builder rollup(int windowSize, java.util.concurrent.TimeUnit unit)
specifies a size of the time window which should be used to give a rolled-up average; defaults to HttpLatencyDetector#LATENCY_WINDOW_DEFAULT_PERIOD#LATENCY_WINDOW_DEFAULT_PERIOD


rollupOff

public Builder rollupOff()
specifies that a rolled-up average should _not_ be calculated and emitted (defaults to true)


url

public Builder url(java.lang.String url)
supplies a constant URL which should be polled for latency, where this constant URL is known. typically the alternative url(AttributeSensor) is used (but you cannot use both forms)


url

public Builder url(AttributeSensor sensor)
supplies a sensor which indicates the URL this should parse (e.g. ROOT_URL)


url

public Builder url(AttributeSensor sensor, Function postProcessing)
supplies a sensor which indicates the URL which this should parse (e.g. ROOT_URL), with post-processing, e.g. StringFunctions#append(String)#append(String)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.