Top Description Fields Constructors Methods
io.vertx.core

public Class VertxOptions

extends Object
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.vertx.codegen.annotations.DataObject, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.dns.AddressResolverOptions, io.vertx.core.eventbus.EventBusOptions, io.vertx.core.file.FileSystemOptions, io.vertx.core.impl.cpu.CpuCoreSensor, io.vertx.core.json.JsonObject, io.vertx.core.metrics.MetricsOptions, io.vertx.core.spi.cluster.ClusterManager, io.vertx.core.tracing.TracingOptions, java.util.Objects, java.util.concurrent.TimeUnit

Instances of this class are used to configure io.vertx.core.Vertx instances.
Author
Tim Fox

Field Summary

Modifier and TypeField 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 = TimeUnit#MILLISECONDS

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 = TimeUnit#NANOSECONDS

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 = TimeUnit#NANOSECONDS

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 = TimeUnit#NANOSECONDS

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

Constructor Summary

AccessConstructor and Description
public
VertxOptions()

Default constructor

public
VertxOptions(VertxOptions
The other VertxOptions to copy when creating this
other
)

Copy constructor

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 io.vertx.core.json.JsonObject

Method Summary

Modifier and TypeMethod and Description
public AddressResolverOptions

Returns:

the address resolver options to configure resolving DNS servers, cache TTL, etc...
getAddressResolverOptions
()

public long

Returns:

the value of blocked thread check period, in blockedThreadCheckIntervalUnit.
getBlockedThreadCheckInterval
()

Get the value of blocked thread check period, in blockedThreadCheckIntervalUnit.

public TimeUnit

Returns:

the time unit of blockedThreadCheckInterval
getBlockedThreadCheckIntervalUnit
()

public ClusterManager

Returns:

the cluster manager.
getClusterManager
()

Get the cluster manager to be used when clustering.

public boolean

Returns:

whether Vert.x sets the Context classloader as the thread context classloader on actions executed on that Context
getDisableTCCL
()

public EventBusOptions

Returns:

the event bus option to configure the event bus communication (host, port, ssl...)
getEventBusOptions
()

public int

Returns:

the number of threads
getEventLoopPoolSize
()

Get the number of event loop threads to be used by the Vert.x instance.

public FileSystemOptions

Returns:

the file system options
getFileSystemOptions
()

public String

Returns:

the HA group
getHAGroup
()

Get the HA group to be used when HA is enabled.

public int

Returns:

the value of internal blocking pool size
getInternalBlockingPoolSize
()

Get the value of internal blocking pool size.

public long

Returns:

the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.
getMaxEventLoopExecuteTime
()

Get the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.

public TimeUnit

Returns:

the time unit of maxEventLoopExecuteTime
getMaxEventLoopExecuteTimeUnit
()

public long

Returns:

The value of max worker execute time, in maxWorkerExecuteTimeUnit.
getMaxWorkerExecuteTime
()

Get the value of max worker execute time, in maxWorkerExecuteTimeUnit.

public TimeUnit

Returns:

the time unit of maxWorkerExecuteTime
getMaxWorkerExecuteTimeUnit
()

public MetricsOptions

Returns:

the metrics options
getMetricsOptions
()

public boolean

Returns:

wether to prefer the native transport to the JDK transport
getPreferNativeTransport
()

public int

Returns:

the quorum size
getQuorumSize
()

Get the quorum size to be used when HA is enabled.

public TracingOptions

Returns:

the tracing options
getTracingOptions
()

If tracing is disabled, the value will be null.

public Boolean

Returns:

true means daemon, false means not daemon(user), null means do not change the daemon option of the created vertx thread.
getUseDaemonThread
()

Returns whether we want to use daemon vertx thread.

public long

Returns:

the warning exception time threshold
getWarningExceptionTime
()

Get the threshold value above this, the blocked warning contains a stack trace.

public TimeUnit

Returns:

the time unit of warningExceptionTime
getWarningExceptionTimeUnit
()

public int

Returns:

the maximum number of worker threads
getWorkerPoolSize
()

Get the maximum number of worker threads to be used by the Vert.x instance.

public boolean

Returns:

true if HA enabled, false otherwise
isHAEnabled
()

Will HA be enabled on the Vert.x instance?

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setAddressResolverOptions
(AddressResolverOptions
the 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 fluently
setBlockedThreadCheckInterval
(long
the value of blocked thread check period, in blockedThreadCheckIntervalUnit.
blockedThreadCheckInterval
)

Sets the value of blocked thread check period, in blockedThreadCheckIntervalUnit.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setBlockedThreadCheckIntervalUnit
(TimeUnit
the time unit of warningExceptionTime
blockedThreadCheckIntervalUnit
)

Set the time unit of blockedThreadCheckInterval.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setClusterManager
(ClusterManager
the cluster manager
clusterManager
)

Programmatically set the cluster manager to be used when clustering.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setDisableTCCL
(boolean
true to disable thread context classloader update by Vertx
disableTCCL
)

Configures whether Vert.x sets the Context classloader as the thread context classloader on actions executed on that Context.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setEventBusOptions
(EventBusOptions
the 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 fluently
setEventLoopPoolSize
(int
the 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 fluently
setFileSystemOptions
(FileSystemOptions
the options
fileSystemOptions
)

Set the file system options

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setHAEnabled
(boolean
true 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 fluently
setHAGroup
(String
the 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 fluently
setInternalBlockingPoolSize
(int
the 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 fluently
setMaxEventLoopExecuteTime
(long
the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.
maxEventLoopExecuteTime
)

Sets the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setMaxEventLoopExecuteTimeUnit
(TimeUnit
the time unit of maxEventLoopExecuteTime
maxEventLoopExecuteTimeUnit
)

Set the time unit of maxEventLoopExecuteTime.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setMaxWorkerExecuteTime
(long
the value of max worker execute time, in maxWorkerExecuteTimeUnit.
maxWorkerExecuteTime
)

Sets the value of max worker execute time, in maxWorkerExecuteTimeUnit.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setMaxWorkerExecuteTimeUnit
(TimeUnit
the time unit of maxWorkerExecuteTime
maxWorkerExecuteTimeUnit
)

Set the time unit of maxWorkerExecuteTime.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setMetricsOptions
(MetricsOptions
the options
metrics
)

Set the metrics options

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setPreferNativeTransport
(boolean
true to prefer the native transport
preferNativeTransport
)

Set wether to prefer the native transport to the JDK transport.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setQuorumSize
(int
the 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 fluently
setTracingOptions
(TracingOptions
the 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.
daemon
)

Mark the vertx thread as daemon thread or user thread.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setWarningExceptionTime
(long warningExceptionTime)

Set 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 fluently
setWarningExceptionTimeUnit
(TimeUnit
the time unit of warningExceptionTime
warningExceptionTimeUnit
)

Set the time unit of warningExceptionTime.

public VertxOptions

Returns:

a reference to this, so the API can be used fluently
setWorkerPoolSize
(int
the 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
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

addressResolverOptionsback to summary
private AddressResolverOptions addressResolverOptions
blockedThreadCheckIntervalback to summary
private long blockedThreadCheckInterval
blockedThreadCheckIntervalUnitback to summary
private TimeUnit blockedThreadCheckIntervalUnit
clusterManagerback to summary
private ClusterManager clusterManager
DEFAULT_BLOCKED_THREAD_CHECK_INTERVALback 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_UNITback to summary
public static final TimeUnit DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL_UNIT

The default value of blocked thread check interval unit = TimeUnit#MILLISECONDS

DEFAULT_DISABLE_TCCLback to summary
public static final boolean DEFAULT_DISABLE_TCCL
DEFAULT_EVENT_LOOP_POOL_SIZEback 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_ENABLEDback to summary
public static final boolean DEFAULT_HA_ENABLED

The default value of HA enabled = false

DEFAULT_HA_GROUPback to summary
public static final String DEFAULT_HA_GROUP

The default value of Ha group is "__DEFAULT__"

DEFAULT_INTERNAL_BLOCKING_POOL_SIZEback 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_TIMEback 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_UNITback to summary
public static final TimeUnit DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME_UNIT

The default value of max event loop execute time unit = TimeUnit#NANOSECONDS

DEFAULT_MAX_WORKER_EXECUTE_TIMEback 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_UNITback to summary
public static final TimeUnit DEFAULT_MAX_WORKER_EXECUTE_TIME_UNIT

The default value of max worker execute time unit = TimeUnit#NANOSECONDS

DEFAULT_PREFER_NATIVE_TRANSPORTback to summary
public static final boolean DEFAULT_PREFER_NATIVE_TRANSPORT

The default value for preferring native transport = false

DEFAULT_QUORUM_SIZEback to summary
public static final int DEFAULT_QUORUM_SIZE

The default value of quorum size = 1

DEFAULT_USE_DAEMON_THREADback 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_TIMEback 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_UNITback to summary
public static final TimeUnit DEFAULT_WARNING_EXCEPTION_TIME_UNIT

The default value of warning exception time unit = TimeUnit#NANOSECONDS

DEFAULT_WORKER_POOL_SIZEback to summary
public static final int DEFAULT_WORKER_POOL_SIZE

The default number of threads in the worker pool = 20

DISABLE_TCCL_PROP_NAMEback to summary
private static final String DISABLE_TCCL_PROP_NAME

Deprecated

instead use VertxOptions#setDisableTCCL(boolean), removed in vertx 5

Annotations
@Deprecated
disableTCCLback to summary
private boolean disableTCCL
eventBusOptionsback to summary
private EventBusOptions eventBusOptions
eventLoopPoolSizeback to summary
private int eventLoopPoolSize
fileSystemOptionsback to summary
private FileSystemOptions fileSystemOptions
haEnabledback to summary
private boolean haEnabled
haGroupback to summary
private String haGroup
internalBlockingPoolSizeback to summary
private int internalBlockingPoolSize
maxEventLoopExecuteTimeback to summary
private long maxEventLoopExecuteTime
maxEventLoopExecuteTimeUnitback to summary
private TimeUnit maxEventLoopExecuteTimeUnit
maxWorkerExecuteTimeback to summary
private long maxWorkerExecuteTime
maxWorkerExecuteTimeUnitback to summary
private TimeUnit maxWorkerExecuteTimeUnit
metricsOptionsback to summary
private MetricsOptions metricsOptions
preferNativeTransportback to summary
private boolean preferNativeTransport
quorumSizeback to summary
private int quorumSize
tracingOptionsback to summary
private TracingOptions tracingOptions
useDaemonThreadback to summary
private Boolean useDaemonThread
warningExceptionTimeback to summary
private long warningExceptionTime
warningExceptionTimeUnitback to summary
private TimeUnit warningExceptionTimeUnit
workerPoolSizeback to summary
private int workerPoolSize

Constructor Detail

VertxOptionsback to summary
public VertxOptions()

Default constructor

VertxOptionsback to summary
public VertxOptions(VertxOptions other)

Copy constructor

Parameters
other:VertxOptions

The other VertxOptions to copy when creating this

VertxOptionsback to summary
public VertxOptions(JsonObject json)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create an instance from a io.vertx.core.json.JsonObject

Parameters
json:JsonObject

the JsonObject to create it from

Method Detail

getAddressResolverOptionsback to summary
public AddressResolverOptions getAddressResolverOptions()
Returns:AddressResolverOptions

the address resolver options to configure resolving DNS servers, cache TTL, etc...

getBlockedThreadCheckIntervalback to summary
public long getBlockedThreadCheckInterval()

Get the value of blocked thread check period, in blockedThreadCheckIntervalUnit.

This setting determines how often Vert.x will check whether event loop threads are executing for too long.

The default value of blockedThreadCheckIntervalUnit is TimeUnit#MILLISECONDS.

Returns:long

the value of blocked thread check period, in blockedThreadCheckIntervalUnit.

getBlockedThreadCheckIntervalUnitback to summary
public TimeUnit getBlockedThreadCheckIntervalUnit()
Returns:TimeUnit

the time unit of blockedThreadCheckInterval

getClusterManagerback 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.

Returns:ClusterManager

the cluster manager.

getDisableTCCLback to summary
public boolean getDisableTCCL()
Returns:boolean

whether Vert.x sets the Context classloader as the thread context classloader on actions executed on that Context

getEventBusOptionsback to summary
public EventBusOptions getEventBusOptions()
Returns:EventBusOptions

the event bus option to configure the event bus communication (host, port, ssl...)

getEventLoopPoolSizeback to summary
public int getEventLoopPoolSize()

Get the number of event loop threads to be used by the Vert.x instance.

Returns:int

the number of threads

getFileSystemOptionsback to summary
public FileSystemOptions getFileSystemOptions()
Returns:FileSystemOptions

the file system options

getHAGroupback to summary
public String getHAGroup()

Get the HA group to be used when HA is enabled.

Returns:String

the HA group

getInternalBlockingPoolSizeback to summary
public int getInternalBlockingPoolSize()

Get the value of internal blocking pool size.

Vert.x maintains a pool for internal blocking operations

Returns:int

the value of internal blocking pool size

getMaxEventLoopExecuteTimeback to summary
public long getMaxEventLoopExecuteTime()

Get the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.

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 maxEventLoopExecuteTimeUnit is TimeUnit#NANOSECONDS

Returns:long

the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.

getMaxEventLoopExecuteTimeUnitback to summary
public TimeUnit getMaxEventLoopExecuteTimeUnit()
Returns:TimeUnit

the time unit of maxEventLoopExecuteTime

getMaxWorkerExecuteTimeback to summary
public long getMaxWorkerExecuteTime()

Get the value of max worker execute time, in maxWorkerExecuteTimeUnit.

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 maxWorkerExecuteTimeUnit is TimeUnit#NANOSECONDS

Returns:long

The value of max worker execute time, in maxWorkerExecuteTimeUnit.

getMaxWorkerExecuteTimeUnitback to summary
public TimeUnit getMaxWorkerExecuteTimeUnit()
Returns:TimeUnit

the time unit of maxWorkerExecuteTime

getMetricsOptionsback to summary
public MetricsOptions getMetricsOptions()
Returns:MetricsOptions

the metrics options

getPreferNativeTransportback to summary
public boolean getPreferNativeTransport()
Returns:boolean

wether to prefer the native transport to the JDK transport

getQuorumSizeback to summary
public int getQuorumSize()

Get the quorum size to be used when HA is enabled.

Returns:int

the quorum size

getTracingOptionsback to summary
public TracingOptions getTracingOptions()

If tracing is disabled, the value will be null.

Returns:TracingOptions

the tracing options

getUseDaemonThreadback to summary
public Boolean getUseDaemonThread()

Returns whether we want to use daemon vertx thread.

Returns:Boolean

true means daemon, false means not daemon(user), null means do not change the daemon option of the created vertx thread.

getWarningExceptionTimeback to summary
public long getWarningExceptionTime()

Get the threshold value above this, the blocked warning contains a stack trace. in warningExceptionTimeUnit.

The default value of warningExceptionTimeUnit is TimeUnit#NANOSECONDS

Returns:long

the warning exception time threshold

getWarningExceptionTimeUnitback to summary
public TimeUnit getWarningExceptionTimeUnit()
Returns:TimeUnit

the time unit of warningExceptionTime

getWorkerPoolSizeback 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.

Returns:int

the maximum number of worker threads

isHAEnabledback to summary
public boolean isHAEnabled()

Will HA be enabled on the Vert.x instance?

Returns:boolean

true if HA enabled, false otherwise

setAddressResolverOptionsback to summary
public VertxOptions setAddressResolverOptions(AddressResolverOptions addressResolverOptions)

Sets the address resolver configuration to configure resolving DNS servers, cache TTL, etc...

Parameters
addressResolverOptions:AddressResolverOptions

the address resolver options

Returns:VertxOptions

a reference to this, so the API can be used fluently

setBlockedThreadCheckIntervalback to summary
public VertxOptions setBlockedThreadCheckInterval(long blockedThreadCheckInterval)

Sets the value of blocked thread check period, in blockedThreadCheckIntervalUnit.

The default value of blockedThreadCheckIntervalUnit is TimeUnit#MILLISECONDS

Parameters
blockedThreadCheckInterval:long

the value of blocked thread check period, in blockedThreadCheckIntervalUnit.

Returns:VertxOptions

a reference to this, so the API can be used fluently

setBlockedThreadCheckIntervalUnitback to summary
public VertxOptions setBlockedThreadCheckIntervalUnit(TimeUnit blockedThreadCheckIntervalUnit)

Set the time unit of blockedThreadCheckInterval.

Parameters
blockedThreadCheckIntervalUnit:TimeUnit

the time unit of warningExceptionTime

Returns:VertxOptions

a reference to this, so the API can be used fluently

setClusterManagerback to summary
public VertxOptions setClusterManager(ClusterManager clusterManager)

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.

Parameters
clusterManager:ClusterManager

the cluster manager

Returns:VertxOptions

a reference to this, so the API can be used fluently

Annotations
@Deprecated
setDisableTCCLback to summary
public VertxOptions setDisableTCCL(boolean disableTCCL)

Configures whether Vert.x sets the Context classloader as the thread context classloader on actions executed on that Context. When a Context is created the current thread classloader is captured and associated with this classloader. Likewise when a Verticle is created, the Verticle's Context classloader is set to the current thread classloader unless this classloader is overriden by DeploymentOptions#getClassLoader(). This setting overrides the (legacy) system property vertx.disableTCCL and provides control at the Vertx instance level.

Parameters
disableTCCL:boolean

true to disable thread context classloader update by Vertx

Returns:VertxOptions

a reference to this, so the API can be used fluently

setEventBusOptionsback to summary
public VertxOptions setEventBusOptions(EventBusOptions options)

Sets the event bus configuration to configure the host, port, ssl...

Parameters
options:EventBusOptions

the event bus options

Returns:VertxOptions

a reference to this, so the API can be used fluently

setEventLoopPoolSizeback to summary
public VertxOptions setEventLoopPoolSize(int eventLoopPoolSize)

Set the number of event loop threads to be used by the Vert.x instance.

Parameters
eventLoopPoolSize:int

the number of threads

Returns:VertxOptions

a reference to this, so the API can be used fluently

setFileSystemOptionsback to summary
public VertxOptions setFileSystemOptions(FileSystemOptions fileSystemOptions)

Set the file system options

Parameters
fileSystemOptions:FileSystemOptions

the options

Returns:VertxOptions

a reference to this, so the API can be used fluently

setHAEnabledback to summary
public VertxOptions setHAEnabled(boolean haEnabled)

Set whether HA will be enabled on the Vert.x instance.

Parameters
haEnabled:boolean

true if enabled, false if not.

Returns:VertxOptions

a reference to this, so the API can be used fluently

setHAGroupback to summary
public VertxOptions setHAGroup(String haGroup)

Set the HA group to be used when HA is enabled.

Parameters
haGroup:String

the HA group to use

Returns:VertxOptions

a reference to this, so the API can be used fluently

setInternalBlockingPoolSizeback to summary
public VertxOptions setInternalBlockingPoolSize(int internalBlockingPoolSize)

Set the value of internal blocking pool size

Parameters
internalBlockingPoolSize:int

the maximumn number of threads in the internal blocking pool

Returns:VertxOptions

a reference to this, so the API can be used fluently

setMaxEventLoopExecuteTimeback to summary
public VertxOptions setMaxEventLoopExecuteTime(long maxEventLoopExecuteTime)

Sets the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.

The default value of maxEventLoopExecuteTimeUnitis TimeUnit#NANOSECONDS

Parameters
maxEventLoopExecuteTime:long

the value of max event loop execute time, in maxEventLoopExecuteTimeUnit.

Returns:VertxOptions

a reference to this, so the API can be used fluently

setMaxEventLoopExecuteTimeUnitback to summary
public VertxOptions setMaxEventLoopExecuteTimeUnit(TimeUnit maxEventLoopExecuteTimeUnit)

Set the time unit of maxEventLoopExecuteTime.

Parameters
maxEventLoopExecuteTimeUnit:TimeUnit

the time unit of maxEventLoopExecuteTime

Returns:VertxOptions

a reference to this, so the API can be used fluently

setMaxWorkerExecuteTimeback to summary
public VertxOptions setMaxWorkerExecuteTime(long maxWorkerExecuteTime)

Sets the value of max worker execute time, in maxWorkerExecuteTimeUnit.

The default value of maxWorkerExecuteTimeUnit is TimeUnit#NANOSECONDS

Parameters
maxWorkerExecuteTime:long

the value of max worker execute time, in maxWorkerExecuteTimeUnit.

Returns:VertxOptions

a reference to this, so the API can be used fluently

setMaxWorkerExecuteTimeUnitback to summary
public VertxOptions setMaxWorkerExecuteTimeUnit(TimeUnit maxWorkerExecuteTimeUnit)

Set the time unit of maxWorkerExecuteTime.

Parameters
maxWorkerExecuteTimeUnit:TimeUnit

the time unit of maxWorkerExecuteTime

Returns:VertxOptions

a reference to this, so the API can be used fluently

setMetricsOptionsback to summary
public VertxOptions setMetricsOptions(MetricsOptions metrics)

Set the metrics options

Parameters
metrics:MetricsOptions

the options

Returns:VertxOptions

a reference to this, so the API can be used fluently

setPreferNativeTransportback to summary
public VertxOptions setPreferNativeTransport(boolean preferNativeTransport)

Set wether to prefer the native transport to the JDK transport.

Parameters
preferNativeTransport:boolean

true to prefer the native transport

Returns:VertxOptions

a reference to this, so the API can be used fluently

setQuorumSizeback to summary
public VertxOptions setQuorumSize(int quorumSize)

Set the quorum size to be used when HA is enabled.

Parameters
quorumSize:int

the quorum size

Returns:VertxOptions

a reference to this, so the API can be used fluently

setTracingOptionsback to summary
public VertxOptions setTracingOptions(TracingOptions tracingOptions)

Set the tracing options

Parameters
tracingOptions:TracingOptions

the options

Returns:VertxOptions

a reference to this, so the API can be used fluently

setUseDaemonThreadback 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 false instead of null.

Parameters
daemon:Boolean

true means daemon, false means not daemon(user), null means do not change the daemon option of the created vertx thread.

setWarningExceptionTimeback to summary
public VertxOptions setWarningExceptionTime(long warningExceptionTime)

Set the threshold value above this, the blocked warning contains a stack trace. in warningExceptionTimeUnit. The default value of warningExceptionTimeUnit is TimeUnit#NANOSECONDS

Returns:VertxOptions

a reference to this, so the API can be used fluently

setWarningExceptionTimeUnitback to summary
public VertxOptions setWarningExceptionTimeUnit(TimeUnit warningExceptionTimeUnit)

Set the time unit of warningExceptionTime.

Parameters
warningExceptionTimeUnit:TimeUnit

the time unit of warningExceptionTime

Returns:VertxOptions

a reference to this, so the API can be used fluently

setWorkerPoolSizeback to summary
public VertxOptions setWorkerPoolSize(int workerPoolSize)

Set the maximum number of worker threads to be used by the Vert.x instance.

Parameters
workerPoolSize:int

the number of threads

Returns:VertxOptions

a reference to this, so the API can be used fluently

toJsonback to summary
public JsonObject toJson()

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override