io.vertx.core.Vertx instances.
| Modifier and Type | Field and Description |
|---|---|
| private AddressResolverOptions | |
| private long | |
| private TimeUnit | |
| private ClusterManager | |
| public static final long | DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL
The default value of blocked thread check interval = 1000 ms. |
| public static final TimeUnit | DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL_UNIT
The default value of blocked thread check interval unit = |
| public static final boolean | |
| public static final int | DEFAULT_EVENT_LOOP_POOL_SIZE
The default number of event loop threads to be used = 2 * number of cores on the machine |
| public static final boolean | DEFAULT_HA_ENABLED
The default value of HA enabled = false |
| public static final String | DEFAULT_HA_GROUP
The default value of Ha group is "__DEFAULT__" |
| public static final int | DEFAULT_INTERNAL_BLOCKING_POOL_SIZE
The default number of threads in the internal blocking pool (used by some internal operations) = 20 |
| public static final long | DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME
The default value of max event loop execute time = 2000000000 ns (2 seconds) |
| public static final TimeUnit | DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME_UNIT
The default value of max event loop execute time unit = |
| public static final long | DEFAULT_MAX_WORKER_EXECUTE_TIME
The default value of max worker execute time = 60000000000 ns (60 seconds) |
| public static final TimeUnit | DEFAULT_MAX_WORKER_EXECUTE_TIME_UNIT
The default value of max worker execute time unit = |
| public static final boolean | DEFAULT_PREFER_NATIVE_TRANSPORT
The default value for preferring native transport = false |
| public static final int | DEFAULT_QUORUM_SIZE
The default value of quorum size = 1 |
| public static final boolean | DEFAULT_USE_DAEMON_THREAD
Set default value to false for aligning with the old behavior By default, Vert.x threads are NOT daemons - we want them to prevent JVM exit so embedded user doesn't have to explicitly prevent JVM from exiting. |
| private static final long | DEFAULT_WARNING_EXCEPTION_TIME
The default value of warning exception time 5000000000 ns (5 seconds) If a thread is blocked longer than this threshold, the warning log contains a stack trace |
| public static final TimeUnit | DEFAULT_WARNING_EXCEPTION_TIME_UNIT
The default value of warning exception time unit = |
| public static final int | DEFAULT_WORKER_POOL_SIZE
The default number of threads in the worker pool = 20 |
| private static final String | DISABLE_TCCL_PROP_NAME
Deprecated
instead use
VertxOptions#setDisableTCCL(boolean), removed in vertx 5
|
| private boolean | |
| private EventBusOptions | |
| private int | |
| private FileSystemOptions | |
| private boolean | |
| private String | |
| private int | |
| private long | |
| private TimeUnit | |
| private long | |
| private TimeUnit | |
| private MetricsOptions | |
| private boolean | |
| private int | |
| private TracingOptions | |
| private Boolean | |
| private long | |
| private TimeUnit | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | VertxOptions(JsonObject
the JsonObject to create it from json)
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
Create an instance from a |
| Modifier and Type | Method and Description |
|---|---|
| public AddressResolverOptions | Returns: the address resolver options to configure resolving DNS servers, cache TTL, etc...
|
| public long | Returns: the value of blocked thread check period, inblockedThreadCheckIntervalUnit.Get the value of blocked thread check period, in |
| public TimeUnit | |
| public ClusterManager | |
| public boolean | |
| public EventBusOptions | Returns: the event bus option to configure the event bus communication (host, port, ssl...)
|
| public int | Returns: the number of threadsGet the number of event loop threads to be used by the Vert.x instance. |
| public FileSystemOptions | |
| public String | |
| public int | Returns: the value of internal blocking pool sizeGet the value of internal blocking pool size. |
| public long | Returns: the value of max event loop execute time, inmaxEventLoopExecuteTimeUnit.Get the value of max event loop execute time, in |
| public TimeUnit | |
| public long | Returns: The value of max worker execute time, inmaxWorkerExecuteTimeUnit.Get the value of max worker execute time, in |
| public TimeUnit | |
| public MetricsOptions | |
| public boolean | |
| public int | |
| public TracingOptions | |
| public Boolean | Returns: true means daemon, false means not daemon(user), null means do
not change the daemon option of the created vertx thread.Returns whether we want to use daemon vertx thread. |
| public long | Returns: the warning exception time thresholdGet the threshold value above this, the blocked warning contains a stack trace. |
| public TimeUnit | |
| public int | Returns: the maximum number of worker threadsGet the maximum number of worker threads to be used by the Vert.x instance. |
| public boolean | |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe address resolver options addressResolverOptions)Sets the address resolver configuration to configure resolving DNS servers, cache TTL, etc... |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe value of blocked thread check period, in blockedThreadCheckInterval)blockedThreadCheckIntervalUnit.Sets the value of blocked thread check period, in |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe time unit of blockedThreadCheckIntervalUnit)warningExceptionTimeSet the time unit of |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe cluster manager clusterManager)
Deprecated
instead use
io.
Programmatically set the cluster manager to be used when clustering. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlytrue to disable thread context classloader update by VertxConfigures whether Vert.x sets the |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe event bus options options)Sets the event bus configuration to configure the host, port, ssl... |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe number of threads eventLoopPoolSize)Set the number of event loop threads to be used by the Vert.x instance. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe options fileSystemOptions)Set the file system options |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlytrue if enabled, false if not. haEnabled)Set whether HA will be enabled on the Vert.x instance. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe HA group to use haGroup)Set the HA group to be used when HA is enabled. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe maximumn number of threads in the internal blocking pool internalBlockingPoolSize)Set the value of internal blocking pool size |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe value of max event loop execute time, in maxEventLoopExecuteTime)maxEventLoopExecuteTimeUnit.Sets the value of max event loop execute time, in |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe time unit of maxEventLoopExecuteTimeUnit)maxEventLoopExecuteTimeSet the time unit of |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe value of max worker execute time, in maxWorkerExecuteTime)maxWorkerExecuteTimeUnit.Sets the value of max worker execute time, in |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe time unit of maxWorkerExecuteTimeUnit)maxWorkerExecuteTimeSet the time unit of |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe options metrics)Set the metrics options |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlytrue to prefer the native transportSet wether to prefer the native transport to the JDK transport. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe quorum size quorumSize)Set the quorum size to be used when HA is enabled. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe options tracingOptions)Set the tracing options |
| public VertxOptions | setUseDaemonThread(Boolean
true means daemon, false means not daemon(user), null
means do not change the daemon option of the created vertx thread.Mark the vertx thread as daemon thread or user thread. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlySet the threshold value above this, the blocked warning contains a stack trace. |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe time unit of warningExceptionTimeUnit)warningExceptionTimeSet the time unit of |
| public VertxOptions | Returns: a reference to this, so the API can be used fluentlythe number of threads workerPoolSize)Set the maximum number of worker threads to be used by the Vert.x instance. |
| public JsonObject | toJson()
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public String |
| addressResolverOptions | back to summary |
|---|---|
| private AddressResolverOptions addressResolverOptions | |
| blockedThreadCheckInterval | back to summary |
|---|---|
| private long blockedThreadCheckInterval | |
| blockedThreadCheckIntervalUnit | back to summary |
|---|---|
| private TimeUnit blockedThreadCheckIntervalUnit | |
| clusterManager | back to summary |
|---|---|
| private ClusterManager clusterManager | |
| DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL | back to summary |
|---|---|
| public static final long DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL The default value of blocked thread check interval = 1000 ms. | |
| DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL_UNIT | back to summary |
|---|---|
| public static final TimeUnit DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL_UNIT The default value of blocked thread check interval unit = | |
| DEFAULT_DISABLE_TCCL | back to summary |
|---|---|
| public static final boolean DEFAULT_DISABLE_TCCL | |
| DEFAULT_EVENT_LOOP_POOL_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_EVENT_LOOP_POOL_SIZE The default number of event loop threads to be used = 2 * number of cores on the machine | |
| DEFAULT_HA_ENABLED | back to summary |
|---|---|
| public static final boolean DEFAULT_HA_ENABLED The default value of HA enabled = false | |
| DEFAULT_HA_GROUP | back to summary |
|---|---|
| public static final String DEFAULT_HA_GROUP The default value of Ha group is "__DEFAULT__" | |
| DEFAULT_INTERNAL_BLOCKING_POOL_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_INTERNAL_BLOCKING_POOL_SIZE The default number of threads in the internal blocking pool (used by some internal operations) = 20 | |
| DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME | back to summary |
|---|---|
| public static final long DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME The default value of max event loop execute time = 2000000000 ns (2 seconds) | |
| DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME_UNIT | back to summary |
|---|---|
| public static final TimeUnit DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME_UNIT The default value of max event loop execute time unit = | |
| DEFAULT_MAX_WORKER_EXECUTE_TIME | back to summary |
|---|---|
| public static final long DEFAULT_MAX_WORKER_EXECUTE_TIME The default value of max worker execute time = 60000000000 ns (60 seconds) | |
| DEFAULT_MAX_WORKER_EXECUTE_TIME_UNIT | back to summary |
|---|---|
| public static final TimeUnit DEFAULT_MAX_WORKER_EXECUTE_TIME_UNIT The default value of max worker execute time unit = | |
| DEFAULT_PREFER_NATIVE_TRANSPORT | back to summary |
|---|---|
| public static final boolean DEFAULT_PREFER_NATIVE_TRANSPORT The default value for preferring native transport = false | |
| DEFAULT_QUORUM_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_QUORUM_SIZE The default value of quorum size = 1 | |
| DEFAULT_USE_DAEMON_THREAD | back to summary |
|---|---|
| public static final boolean DEFAULT_USE_DAEMON_THREAD Set default value to false for aligning with the old behavior By default, Vert.x threads are NOT daemons - we want them to prevent JVM exit so embedded user doesn't have to explicitly prevent JVM from exiting. | |
| DEFAULT_WARNING_EXCEPTION_TIME | back to summary |
|---|---|
| private static final long DEFAULT_WARNING_EXCEPTION_TIME The default value of warning exception time 5000000000 ns (5 seconds) If a thread is blocked longer than this threshold, the warning log contains a stack trace | |
| DEFAULT_WARNING_EXCEPTION_TIME_UNIT | back to summary |
|---|---|
| public static final TimeUnit DEFAULT_WARNING_EXCEPTION_TIME_UNIT The default value of warning exception time unit = | |
| DEFAULT_WORKER_POOL_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_WORKER_POOL_SIZE The default number of threads in the worker pool = 20 | |
| DISABLE_TCCL_PROP_NAME | back to summary |
|---|---|
| private static final String DISABLE_TCCL_PROP_NAME
Deprecated instead use | |
| disableTCCL | back to summary |
|---|---|
| private boolean disableTCCL | |
| eventBusOptions | back to summary |
|---|---|
| private EventBusOptions eventBusOptions | |
| eventLoopPoolSize | back to summary |
|---|---|
| private int eventLoopPoolSize | |
| fileSystemOptions | back to summary |
|---|---|
| private FileSystemOptions fileSystemOptions | |
| haEnabled | back to summary |
|---|---|
| private boolean haEnabled | |
| haGroup | back to summary |
|---|---|
| private String haGroup | |
| internalBlockingPoolSize | back to summary |
|---|---|
| private int internalBlockingPoolSize | |
| maxEventLoopExecuteTime | back to summary |
|---|---|
| private long maxEventLoopExecuteTime | |
| maxEventLoopExecuteTimeUnit | back to summary |
|---|---|
| private TimeUnit maxEventLoopExecuteTimeUnit | |
| maxWorkerExecuteTime | back to summary |
|---|---|
| private long maxWorkerExecuteTime | |
| maxWorkerExecuteTimeUnit | back to summary |
|---|---|
| private TimeUnit maxWorkerExecuteTimeUnit | |
| metricsOptions | back to summary |
|---|---|
| private MetricsOptions metricsOptions | |
| preferNativeTransport | back to summary |
|---|---|
| private boolean preferNativeTransport | |
| quorumSize | back to summary |
|---|---|
| private int quorumSize | |
| tracingOptions | back to summary |
|---|---|
| private TracingOptions tracingOptions | |
| useDaemonThread | back to summary |
|---|---|
| private Boolean useDaemonThread | |
| warningExceptionTime | back to summary |
|---|---|
| private long warningExceptionTime | |
| warningExceptionTimeUnit | back to summary |
|---|---|
| private TimeUnit warningExceptionTimeUnit | |
| workerPoolSize | back to summary |
|---|---|
| private int workerPoolSize | |
| VertxOptions | back to summary |
|---|---|
| public VertxOptions() Default constructor | |
| VertxOptions | back to summary |
|---|---|
| public VertxOptions(VertxOptions other) Copy constructor
| |
| VertxOptions | back to summary |
|---|---|
| public VertxOptions(JsonObject json)
References Deprecated
See corresponding docs for further information. Create an instance from a
| |
| getAddressResolverOptions | back to summary |
|---|---|
public AddressResolverOptions getAddressResolverOptions()
| |
| getBlockedThreadCheckInterval | back to summary |
|---|---|
| public long getBlockedThreadCheckInterval() Get the value of blocked thread check period, in This setting determines how often Vert.x will check whether event loop threads are executing for too long.
The default value of
| |
| getBlockedThreadCheckIntervalUnit | back to summary |
|---|---|
public TimeUnit getBlockedThreadCheckIntervalUnit()
| |
| getClusterManager | back to summary |
|---|---|
| public ClusterManager getClusterManager() Get the cluster manager to be used when clustering. If the cluster manager has been programmatically set here, then that will be used when clustering. Otherwise Vert.x attempts to locate a cluster manager on the classpath.
| |
| getDisableTCCL | back to summary |
|---|---|
| public boolean getDisableTCCL() | |
| getEventBusOptions | back to summary |
|---|---|
public EventBusOptions getEventBusOptions()
| |
| getEventLoopPoolSize | back to summary |
|---|---|
| public int getEventLoopPoolSize() Get the number of event loop threads to be used by the Vert.x instance.
| |
| getFileSystemOptions | back to summary |
|---|---|
public FileSystemOptions getFileSystemOptions()
| |
| getHAGroup | back to summary |
|---|---|
| public String getHAGroup() Get the HA group to be used when HA is enabled.
| |
| getInternalBlockingPoolSize | back to summary |
|---|---|
| public int getInternalBlockingPoolSize() Get the value of internal blocking pool size. Vert.x maintains a pool for internal blocking operations
| |
| getMaxEventLoopExecuteTime | back to summary |
|---|---|
| public long getMaxEventLoopExecuteTime() Get the value of max event loop execute time, in Vert.x will automatically log a warning if it detects that event loop threads haven't returned within this time. This can be used to detect where the user is blocking an event loop thread, contrary to the Golden Rule of the holy Event Loop.
The default value of
| |
| getMaxEventLoopExecuteTimeUnit | back to summary |
|---|---|
public TimeUnit getMaxEventLoopExecuteTimeUnit()
| |
| getMaxWorkerExecuteTime | back to summary |
|---|---|
| public long getMaxWorkerExecuteTime() Get the value of max worker execute time, in Vert.x will automatically log a warning if it detects that worker threads haven't returned within this time. This can be used to detect where the user is blocking a worker thread for too long. Although worker threads can be blocked longer than event loop threads, they shouldn't be blocked for long periods of time.
The default value of
| |
| getMaxWorkerExecuteTimeUnit | back to summary |
|---|---|
public TimeUnit getMaxWorkerExecuteTimeUnit()
| |
| getMetricsOptions | back to summary |
|---|---|
public MetricsOptions getMetricsOptions()
| |
| getPreferNativeTransport | back to summary |
|---|---|
public boolean getPreferNativeTransport()
| |
| getQuorumSize | back to summary |
|---|---|
| public int getQuorumSize() Get the quorum size to be used when HA is enabled.
| |
| getTracingOptions | back to summary |
|---|---|
| public TracingOptions getTracingOptions() If tracing is disabled, the value will be
| |
| getUseDaemonThread | back to summary |
|---|---|
| public Boolean getUseDaemonThread() Returns whether we want to use daemon vertx thread.
| |
| getWarningExceptionTime | back to summary |
|---|---|
| public long getWarningExceptionTime() Get the threshold value above this, the blocked warning contains a stack trace. in
The default value of
| |
| getWarningExceptionTimeUnit | back to summary |
|---|---|
public TimeUnit getWarningExceptionTimeUnit()
| |
| getWorkerPoolSize | back to summary |
|---|---|
| public int getWorkerPoolSize() Get the maximum number of worker threads to be used by the Vert.x instance. Worker threads are used for running blocking code and worker verticles.
| |
| isHAEnabled | back to summary |
|---|---|
| public boolean isHAEnabled() Will HA be enabled on the Vert.x instance?
| |
| setAddressResolverOptions | back to summary |
|---|---|
| public VertxOptions setAddressResolverOptions(AddressResolverOptions addressResolverOptions) Sets the address resolver configuration to configure resolving DNS servers, cache TTL, etc...
| |
| setBlockedThreadCheckInterval | back to summary |
|---|---|
| public VertxOptions setBlockedThreadCheckInterval(long blockedThreadCheckInterval) Sets the value of blocked thread check period, in
The default value of
| |
| setBlockedThreadCheckIntervalUnit | back to summary |
|---|---|
| public VertxOptions setBlockedThreadCheckIntervalUnit(TimeUnit blockedThreadCheckIntervalUnit) Set the time unit of
| |
| setClusterManager | back to summary |
|---|---|
| public VertxOptions setClusterManager(ClusterManager clusterManager)
Deprecated instead use Programmatically set the cluster manager to be used when clustering. Only valid if clustered = true. Normally Vert.x will look on the classpath for a cluster manager, but if you want to set one programmatically you can use this method.
| |
| setDisableTCCL | back to summary |
|---|---|
| public VertxOptions setDisableTCCL(boolean disableTCCL) Configures whether Vert.x sets the
| |
| setEventBusOptions | back to summary |
|---|---|
| public VertxOptions setEventBusOptions(EventBusOptions options) Sets the event bus configuration to configure the host, port, ssl...
| |
| setEventLoopPoolSize | back to summary |
|---|---|
| public VertxOptions setEventLoopPoolSize(int eventLoopPoolSize) Set the number of event loop threads to be used by the Vert.x instance.
| |
| setFileSystemOptions | back to summary |
|---|---|
| public VertxOptions setFileSystemOptions(FileSystemOptions fileSystemOptions) Set the file system options
| |
| setHAEnabled | back to summary |
|---|---|
| public VertxOptions setHAEnabled(boolean haEnabled) Set whether HA will be enabled on the Vert.x instance.
| |
| setHAGroup | back to summary |
|---|---|
| public VertxOptions setHAGroup(String haGroup) Set the HA group to be used when HA is enabled.
| |
| setInternalBlockingPoolSize | back to summary |
|---|---|
| public VertxOptions setInternalBlockingPoolSize(int internalBlockingPoolSize) Set the value of internal blocking pool size
| |
| setMaxEventLoopExecuteTime | back to summary |
|---|---|
| public VertxOptions setMaxEventLoopExecuteTime(long maxEventLoopExecuteTime) Sets the value of max event loop execute time, in
The default value of
| |
| setMaxEventLoopExecuteTimeUnit | back to summary |
|---|---|
| public VertxOptions setMaxEventLoopExecuteTimeUnit(TimeUnit maxEventLoopExecuteTimeUnit) Set the time unit of
| |
| setMaxWorkerExecuteTime | back to summary |
|---|---|
| public VertxOptions setMaxWorkerExecuteTime(long maxWorkerExecuteTime) Sets the value of max worker execute time, in
The default value of
| |
| setMaxWorkerExecuteTimeUnit | back to summary |
|---|---|
| public VertxOptions setMaxWorkerExecuteTimeUnit(TimeUnit maxWorkerExecuteTimeUnit) Set the time unit of
| |
| setMetricsOptions | back to summary |
|---|---|
| public VertxOptions setMetricsOptions(MetricsOptions metrics) Set the metrics options
| |
| setPreferNativeTransport | back to summary |
|---|---|
| public VertxOptions setPreferNativeTransport(boolean preferNativeTransport) Set wether to prefer the native transport to the JDK transport.
| |
| setQuorumSize | back to summary |
|---|---|
| public VertxOptions setQuorumSize(int quorumSize) Set the quorum size to be used when HA is enabled.
| |
| setTracingOptions | back to summary |
|---|---|
| public VertxOptions setTracingOptions(TracingOptions tracingOptions) Set the tracing options
| |
| setUseDaemonThread | back to summary |
|---|---|
| public VertxOptions setUseDaemonThread(Boolean daemon) Mark the vertx thread as daemon thread or user thread.
For keeping the old behavior, the default value is
| |
| setWarningExceptionTime | back to summary |
|---|---|
| public VertxOptions setWarningExceptionTime(long warningExceptionTime) Set the threshold value above this, the blocked warning contains a stack trace. in
| |
| setWarningExceptionTimeUnit | back to summary |
|---|---|
| public VertxOptions setWarningExceptionTimeUnit(TimeUnit warningExceptionTimeUnit) Set the time unit of
| |
| setWorkerPoolSize | back to summary |
|---|---|
| public VertxOptions setWorkerPoolSize(int workerPoolSize) Set the maximum number of worker threads to be used by the Vert.x instance.
| |
| toJson | back to summary |
|---|---|
| public JsonObject toJson()
References Deprecated
See corresponding docs for further information. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |