public class MetricsOptions extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_METRICS_ENABLED
The default value of metrics enabled false
|
Constructor and Description |
---|
MetricsOptions()
Default constructor
|
MetricsOptions(JsonObject json)
Create an instance from a
JsonObject |
MetricsOptions(MetricsOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
VertxMetricsFactory |
getFactory()
Get the metrics factory to be used when metrics are enabled.
|
boolean |
isEnabled()
Will metrics be enabled on the Vert.x instance?
|
MetricsOptions |
setEnabled(boolean enable)
Set whether metrics will be enabled on the Vert.x instance.
|
MetricsOptions |
setFactory(VertxMetricsFactory factory)
Deprecated.
instead use
VertxBuilder.withMetrics(VertxMetricsFactory) |
JsonObject |
toJson() |
String |
toString() |
public static final boolean DEFAULT_METRICS_ENABLED
public MetricsOptions()
public MetricsOptions(MetricsOptions other)
other
- The other MetricsOptions
to copy when creating thispublic MetricsOptions(JsonObject json)
JsonObject
json
- the JsonObject to create it frompublic boolean isEnabled()
public MetricsOptions setEnabled(boolean enable)
enable
- true if metrics enabled, or false if not.public VertxMetricsFactory getFactory()
If the metrics factory has been programmatically set here, then that will be used when metrics are enabled
for creating the VertxMetrics
instance.
Otherwise Vert.x attempts to locate a metrics factory implementation on the classpath.
@Deprecated public MetricsOptions setFactory(VertxMetricsFactory factory)
VertxBuilder.withMetrics(VertxMetricsFactory)
Only valid if isEnabled()
= true.
Normally Vert.x will look on the classpath for a metrics factory implementation, but if you want to set one programmatically you can use this method.
factory
- the metrics factorypublic JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.