Package org.eclipse.hono.config
Class VertxProperties
- java.lang.Object
-
- org.eclipse.hono.config.VertxProperties
-
public class VertxProperties extends Object
Vertx properties.
-
-
Constructor Summary
Constructors Constructor Description VertxProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.vertx.core.VertxOptions
configureVertx(io.vertx.core.VertxOptions options)
Configures the Vert.x options based on this object's property values.void
setDnsQueryTimeout(long timeout)
Sets the DNS query timeout, i.e the amount of time after which a DNS query is considered to be failed.void
setEnableMetrics(boolean enableMetrics)
Enable the vert.x metrics system, or not.void
setMaxEventLoopExecuteTime(long executeTime)
Sets the maximum number of milliseconds that a task on the event loop may run without being considered to block the event loop.void
setPreferNative(boolean preferNative)
Prefer to use native networking, or not.
-
-
-
Method Detail
-
setPreferNative
public void setPreferNative(boolean preferNative)
Prefer to use native networking, or not.Also see
VertxOptions.setPreferNativeTransport(boolean)
.The default is to not prefer native networking.
- Parameters:
preferNative
-true
to prefer native networking,false
otherwise.
-
setEnableMetrics
public void setEnableMetrics(boolean enableMetrics)
Enable the vert.x metrics system, or not.This decides if the vert.x metrics system will be enabled. Hono uses the Spring Boot integration with Micrometer, so enabling the vert.x metrics will only enable the contribution of vert.x internal metrics to this system.
The default is to not enable vert.x metrics.
- Parameters:
enableMetrics
-true
to enable the metrics system,false
otherwise.
-
setMaxEventLoopExecuteTime
public void setMaxEventLoopExecuteTime(long executeTime)
Sets the maximum number of milliseconds that a task on the event loop may run without being considered to block the event loop.The default value of this property is 2000 milliseconds.
- Parameters:
executeTime
- The number of milliseconds.- Throws:
IllegalArgumentException
- if execute time is less than 1.
-
setDnsQueryTimeout
public void setDnsQueryTimeout(long timeout)
Sets the DNS query timeout, i.e the amount of time after which a DNS query is considered to be failed.The default value of this property is 5000 milliseconds.
- Parameters:
timeout
- The timeout in milliseconds.- Throws:
IllegalArgumentException
- if timeout is less than 100ms.
-
configureVertx
public io.vertx.core.VertxOptions configureVertx(io.vertx.core.VertxOptions options)
Configures the Vert.x options based on this object's property values.- Parameters:
options
- The options to configure.- Returns:
- The (updated) options.
-
-