Class AggregatorConfiguration.Builder
java.lang.Object
com.arpnetworking.commons.builder.OvalBuilder<AggregatorConfiguration>
com.arpnetworking.metrics.mad.configuration.AggregatorConfiguration.Builder
- All Implemented Interfaces:
com.arpnetworking.commons.builder.Builder<AggregatorConfiguration>
- Enclosing class:
- AggregatorConfiguration
public static class AggregatorConfiguration.Builder
extends com.arpnetworking.commons.builder.OvalBuilder<AggregatorConfiguration>
Builder
implementation for
AggregatorConfiguration
.- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsetAkkaConfiguration
(Map<String, ?> value) Akka configuration.setEnableHttps
(Boolean value) Whether to start the https server.setHttpHealthCheckPath
(String value) The http health check path.setHttpHost
(String value) The http host address to bind to.setHttpPort
(Integer value) The http port to listen on.setHttpsCertificatePath
(String value) The location of the https certificate file.setHttpsHost
(String value) The https host address to bind to.setHttpsKeyPath
(String value) The location of the https key file.setHttpsPort
(Integer value) The https port to listen on.setHttpStatusPath
(String value) The http status path.Period for collecting JVM metrics.setLogDeadLetters
(Boolean value) Whether to install theDeadLetterLogger
to log all dead letter senders, recipients and messages.setLogDirectory
(File value) The log directory.setMetricsClientHost
(String value) Deprecated.setMetricsClientPort
(Integer value) Deprecated.setMonitoringCluster
(String value) The monitoring cluster.setMonitoringHost
(String value) The host to use as value for the host tag.setMonitoringService
(String value) The monitoring service.setMonitoringSinks
(com.google.common.collect.ImmutableList<com.fasterxml.jackson.databind.JsonNode> value) The monitoring sinks.setPipelinesDirectory
(File value) The pipelines directory.setSupplementalHttpRoutesClass
(Class<? extends SupplementalRoutes> value) The supplemental routes class.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
-
setMonitoringCluster
The monitoring cluster. Cannot be null or empty.- Parameters:
value
- The monitoring cluster.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setMonitoringService
The monitoring service. Optional. Cannot be null or empty. The default value ismad
.- Parameters:
value
- The monitoring service.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setMonitoringSinks
public AggregatorConfiguration.Builder setMonitoringSinks(com.google.common.collect.ImmutableList<com.fasterxml.jackson.databind.JsonNode> value) The monitoring sinks. Optional. Cannot be null. The default value is the default instance ofApacheHttpSink
.- Parameters:
value
- The monitoring sinks.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setMetricsClientHost
Deprecated.The metrics client http host address to send to. Optional. Cannot be empty. Defaults to unspecified.- Parameters:
value
- The metrics client host address to send to.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setMetricsClientPort
Deprecated.The metrics client http port to send to. Optional. Must be between 1 and 65535 (inclusive). Defaults to unspecified.- Parameters:
value
- The metrics client port to listen send to.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setJvmMetricsCollectionInterval
Period for collecting JVM metrics. Optional. Default is 500 milliseconds.- Parameters:
value
- ADuration
value.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setLogDirectory
The log directory. Cannot be null.- Parameters:
value
- The log directory.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setPipelinesDirectory
The pipelines directory. Cannot be null.- Parameters:
value
- The pipelines directory.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpHost
The http host address to bind to. Cannot be null or empty.- Parameters:
value
- The host address to bind to.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpsHost
The https host address to bind to. Cannot be null or empty.- Parameters:
value
- The host address to bind to.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpHealthCheckPath
The http health check path. Cannot be null or empty. Optional. Default is "/ping".- Parameters:
value
- The health check path.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpStatusPath
The http status path. Cannot be null or empty. Optional. Default is "/status".- Parameters:
value
- The status path.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpsKeyPath
The location of the https key file. Cannot be null or empty. Optional. Default is "/opt/mad/tls/key.pem".- Parameters:
value
- The path to the https key file- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpsCertificatePath
The location of the https certificate file. Cannot be null or empty. Optional. Default is "/opt/mad/tls/cert.pem".- Parameters:
value
- The path to the https cert file- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpPort
The http port to listen on. Cannot be null, must be between 1 and 65535 (inclusive).- Parameters:
value
- The port to listen on.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setHttpsPort
The https port to listen on. Cannot be null, must be between 1 and 65535 (inclusive).- Parameters:
value
- The port to listen on.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setEnableHttps
Whether to start the https server. Value cannot be null. Defaults tofalse
- Parameters:
value
-True
if the https server should be enabled- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setSupplementalHttpRoutesClass
public AggregatorConfiguration.Builder setSupplementalHttpRoutesClass(Class<? extends SupplementalRoutes> value) The supplemental routes class. Optional.- Parameters:
value
- The class of the supplement routes.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setMonitoringHost
The host to use as value for the host tag. Optional. Defaults to looking up the hostname.- Parameters:
value
- The host to use as value for the host tag.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setLogDeadLetters
Whether to install theDeadLetterLogger
to log all dead letter senders, recipients and messages. It differs from the built-in Akka logging in that it actually logs the message (as provided bytoString()
) instead of just the message type.- Parameters:
value
-True
if dead letter logging should be enabled- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setAkkaConfiguration
Akka configuration. Cannot be null. By convention Akka configuration begins with a map containing a single key "akka" and a value of a nested map. For more information please see: http://doc.akka.io/docs/akka/snapshot/general/configuration.html NOTE: No validation is performed on the Akka configuration itself.- Parameters:
value
- The Akka configuration.- Returns:
- This instance of
AggregatorConfiguration.Builder
.
-
setMonitoringSinks(ImmutableList)