Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL
The default value of blocked thread check interval = 1000 ms.
|
static TimeUnit |
DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL_UNIT
The default value of blocked thread check interval unit =
TimeUnit.MILLISECONDS |
static String |
DEFAULT_CLUSTER_HOST
Deprecated.
as of 3.7, use
EventBusOptions.DEFAULT_CLUSTER_HOST instead |
static long |
DEFAULT_CLUSTER_PING_INTERVAL
Deprecated.
as of 3.7, use
EventBusOptions.DEFAULT_CLUSTER_PING_INTERVAL instead |
static long |
DEFAULT_CLUSTER_PING_REPLY_INTERVAL
Deprecated.
as of 3.7, use
EventBusOptions.DEFAULT_CLUSTER_PING_REPLY_INTERVAL instead |
static int |
DEFAULT_CLUSTER_PORT
Deprecated.
as of 3.7, use
EventBusOptions.DEFAULT_CLUSTER_PORT instead |
static String |
DEFAULT_CLUSTER_PUBLIC_HOST
Deprecated.
as of 3.7, use
EventBusOptions.DEFAULT_CLUSTER_PUBLIC_HOST instead |
static int |
DEFAULT_CLUSTER_PUBLIC_PORT
Deprecated.
as of 3.7, use
EventBusOptions.DEFAULT_CLUSTER_PUBLIC_PORT instead |
static boolean |
DEFAULT_CLUSTERED
Deprecated.
as of 3.7, use
EventBusOptions.DEFAULT_CLUSTERED instead |
static int |
DEFAULT_EVENT_LOOP_POOL_SIZE
The default number of event loop threads to be used = 2 * number of cores on the machine
|
static boolean |
DEFAULT_HA_ENABLED
The default value of HA enabled = false
|
static String |
DEFAULT_HA_GROUP
The default value of Ha group is "__DEFAULT__"
|
static int |
DEFAULT_INTERNAL_BLOCKING_POOL_SIZE
The default number of threads in the internal blocking pool (used by some internal operations) = 20
|
static long |
DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME
The default value of max event loop execute time = 2000000000 ns (2 seconds)
|
static TimeUnit |
DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME_UNIT
The default value of max event loop execute time unit =
TimeUnit.NANOSECONDS |
static long |
DEFAULT_MAX_WORKER_EXECUTE_TIME
The default value of max worker execute time = 60000000000 ns (60 seconds)
|
static TimeUnit |
DEFAULT_MAX_WORKER_EXECUTE_TIME_UNIT
The default value of max worker execute time unit =
TimeUnit.NANOSECONDS |
static boolean |
DEFAULT_PREFER_NATIVE_TRANSPORT
The default value for preferring native transport = false
|
static int |
DEFAULT_QUORUM_SIZE
The default value of quorum size = 1
|
static TimeUnit |
DEFAULT_WARNING_EXCEPTION_TIME_UNIT
The default value of warning exception time unit =
TimeUnit.NANOSECONDS |
static int |
DEFAULT_WORKER_POOL_SIZE
The default number of threads in the worker pool = 20
|
Constructor and Description |
---|
VertxOptions()
Default constructor
|
VertxOptions(JsonObject json)
Create an instance from a
JsonObject |
VertxOptions(VertxOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
AddressResolverOptions |
getAddressResolverOptions() |
long |
getBlockedThreadCheckInterval()
Get the value of blocked thread check period, in
blockedThreadCheckIntervalUnit . |
TimeUnit |
getBlockedThreadCheckIntervalUnit() |
String |
getClusterHost()
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.getHost() instead |
ClusterManager |
getClusterManager()
Get the cluster manager to be used when clustering.
|
long |
getClusterPingInterval()
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.getClusterPingInterval() instead |
long |
getClusterPingReplyInterval()
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.getClusterPingReplyInterval() instead |
int |
getClusterPort()
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.getPort() instead |
String |
getClusterPublicHost()
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.getClusterPublicHost() instead |
int |
getClusterPublicPort()
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.getClusterPublicPort() instead |
EventBusOptions |
getEventBusOptions() |
int |
getEventLoopPoolSize()
Get the number of event loop threads to be used by the Vert.x instance.
|
FileSystemOptions |
getFileSystemOptions() |
String |
getHAGroup()
Get the HA group to be used when HA is enabled.
|
int |
getInternalBlockingPoolSize()
Get the value of internal blocking pool size.
|
long |
getMaxEventLoopExecuteTime()
Get the value of max event loop execute time, in
maxEventLoopExecuteTimeUnit . |
TimeUnit |
getMaxEventLoopExecuteTimeUnit() |
long |
getMaxWorkerExecuteTime()
Get the value of max worker execute time, in
maxWorkerExecuteTimeUnit . |
TimeUnit |
getMaxWorkerExecuteTimeUnit() |
MetricsOptions |
getMetricsOptions() |
boolean |
getPreferNativeTransport() |
int |
getQuorumSize()
Get the quorum size to be used when HA is enabled.
|
long |
getWarningExceptionTime()
Get the threshold value above this, the blocked warning contains a stack trace.
|
TimeUnit |
getWarningExceptionTimeUnit() |
int |
getWorkerPoolSize()
Get the maximum number of worker threads to be used by the Vert.x instance.
|
int |
hashCode() |
boolean |
isClustered()
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.isClustered() instead |
boolean |
isFileResolverCachingEnabled()
Deprecated.
use
getFileSystemOptions().isFileCachingEnabled() instead |
boolean |
isHAEnabled()
Will HA be enabled on the Vert.x instance?
|
VertxOptions |
setAddressResolverOptions(AddressResolverOptions addressResolverOptions)
Sets the address resolver configuration to configure resolving DNS servers, cache TTL, etc...
|
VertxOptions |
setBlockedThreadCheckInterval(long blockedThreadCheckInterval)
Sets the value of blocked thread check period, in
blockedThreadCheckIntervalUnit . |
VertxOptions |
setBlockedThreadCheckIntervalUnit(TimeUnit blockedThreadCheckIntervalUnit)
Set the time unit of
blockedThreadCheckInterval . |
VertxOptions |
setClustered(boolean clustered)
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.setClustered(boolean) instead |
VertxOptions |
setClusterHost(String clusterHost)
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.setHost(String) instead |
VertxOptions |
setClusterManager(ClusterManager clusterManager)
Programmatically set the cluster manager to be used when clustering.
|
VertxOptions |
setClusterPingInterval(long clusterPingInterval)
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.setClusterPingInterval(long) instead |
VertxOptions |
setClusterPingReplyInterval(long clusterPingReplyInterval)
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.setClusterPingReplyInterval(long) instead |
VertxOptions |
setClusterPort(int clusterPort)
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.setPort(int) instead |
VertxOptions |
setClusterPublicHost(String clusterPublicHost)
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.setClusterPublicHost(String) instead |
VertxOptions |
setClusterPublicPort(int clusterPublicPort)
Deprecated.
as of 3.7, use
getEventBusOptions() and then EventBusOptions.setClusterPublicPort(int) instead |
VertxOptions |
setEventBusOptions(EventBusOptions options)
Sets the event bus configuration to configure the host, port, ssl...
|
VertxOptions |
setEventLoopPoolSize(int eventLoopPoolSize)
Set the number of event loop threads to be used by the Vert.x instance.
|
VertxOptions |
setFileResolverCachingEnabled(boolean fileResolverCachingEnabled)
Deprecated.
|
VertxOptions |
setFileSystemOptions(FileSystemOptions fileSystemOptions)
Set the file system options
|
VertxOptions |
setHAEnabled(boolean haEnabled)
Set whether HA will be enabled on the Vert.x instance.
|
VertxOptions |
setHAGroup(String haGroup)
Set the HA group to be used when HA is enabled.
|
VertxOptions |
setInternalBlockingPoolSize(int internalBlockingPoolSize)
Set the value of internal blocking pool size
|
VertxOptions |
setMaxEventLoopExecuteTime(long maxEventLoopExecuteTime)
Sets the value of max event loop execute time, in
maxEventLoopExecuteTimeUnit . |
VertxOptions |
setMaxEventLoopExecuteTimeUnit(TimeUnit maxEventLoopExecuteTimeUnit)
Set the time unit of
maxEventLoopExecuteTime . |
VertxOptions |
setMaxWorkerExecuteTime(long maxWorkerExecuteTime)
Sets the value of max worker execute time, in
maxWorkerExecuteTimeUnit . |
VertxOptions |
setMaxWorkerExecuteTimeUnit(TimeUnit maxWorkerExecuteTimeUnit)
Set the time unit of
maxWorkerExecuteTime . |
VertxOptions |
setMetricsOptions(MetricsOptions metrics)
Set the metrics options
|
VertxOptions |
setPreferNativeTransport(boolean preferNativeTransport)
Set wether to prefer the native transport to the JDK transport.
|
VertxOptions |
setQuorumSize(int quorumSize)
Set the quorum size to be used when HA is enabled.
|
VertxOptions |
setWarningExceptionTime(long warningExceptionTime)
Set the threshold value above this, the blocked warning contains a stack trace.
|
VertxOptions |
setWarningExceptionTimeUnit(TimeUnit warningExceptionTimeUnit)
Set the time unit of
warningExceptionTime . |
VertxOptions |
setWorkerPoolSize(int workerPoolSize)
Set the maximum number of worker threads to be used by the Vert.x instance.
|
String |
toString() |
public static final int DEFAULT_EVENT_LOOP_POOL_SIZE
public static final int DEFAULT_WORKER_POOL_SIZE
public static final int DEFAULT_INTERNAL_BLOCKING_POOL_SIZE
@Deprecated public static final boolean DEFAULT_CLUSTERED
EventBusOptions.DEFAULT_CLUSTERED
instead@Deprecated public static final String DEFAULT_CLUSTER_HOST
EventBusOptions.DEFAULT_CLUSTER_HOST
instead@Deprecated public static final int DEFAULT_CLUSTER_PORT
EventBusOptions.DEFAULT_CLUSTER_PORT
instead@Deprecated public static final String DEFAULT_CLUSTER_PUBLIC_HOST
EventBusOptions.DEFAULT_CLUSTER_PUBLIC_HOST
instead@Deprecated public static final int DEFAULT_CLUSTER_PUBLIC_PORT
EventBusOptions.DEFAULT_CLUSTER_PUBLIC_PORT
instead@Deprecated public static final long DEFAULT_CLUSTER_PING_INTERVAL
EventBusOptions.DEFAULT_CLUSTER_PING_INTERVAL
instead@Deprecated public static final long DEFAULT_CLUSTER_PING_REPLY_INTERVAL
EventBusOptions.DEFAULT_CLUSTER_PING_REPLY_INTERVAL
insteadpublic static final long DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL
public static final TimeUnit DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL_UNIT
TimeUnit.MILLISECONDS
public static final long DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME
public static final TimeUnit DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME_UNIT
TimeUnit.NANOSECONDS
public static final long DEFAULT_MAX_WORKER_EXECUTE_TIME
public static final TimeUnit DEFAULT_MAX_WORKER_EXECUTE_TIME_UNIT
TimeUnit.NANOSECONDS
public static final int DEFAULT_QUORUM_SIZE
public static final String DEFAULT_HA_GROUP
public static final boolean DEFAULT_HA_ENABLED
public static final boolean DEFAULT_PREFER_NATIVE_TRANSPORT
public static final TimeUnit DEFAULT_WARNING_EXCEPTION_TIME_UNIT
TimeUnit.NANOSECONDS
public VertxOptions()
public VertxOptions(VertxOptions other)
other
- The other VertxOptions
to copy when creating thispublic VertxOptions(JsonObject json)
JsonObject
json
- the JsonObject to create it frompublic int getEventLoopPoolSize()
public VertxOptions setEventLoopPoolSize(int eventLoopPoolSize)
eventLoopPoolSize
- the number of threadspublic int getWorkerPoolSize()
Worker threads are used for running blocking code and worker verticles.
public VertxOptions setWorkerPoolSize(int workerPoolSize)
workerPoolSize
- the number of threads@Deprecated public boolean isClustered()
getEventBusOptions()
and then EventBusOptions.isClustered()
instead@Deprecated public VertxOptions setClustered(boolean clustered)
getEventBusOptions()
and then EventBusOptions.setClustered(boolean)
insteadclustered
- if true, the Vert.x instance will be clustered, otherwise not@Deprecated public String getClusterHost()
getEventBusOptions()
and then EventBusOptions.getHost()
instead@Deprecated public VertxOptions setClusterHost(String clusterHost)
getEventBusOptions()
and then EventBusOptions.setHost(String)
insteadclusterHost
- the host name to use@Deprecated public String getClusterPublicHost()
getEventBusOptions()
and then EventBusOptions.getClusterPublicHost()
instead@Deprecated public VertxOptions setClusterPublicHost(String clusterPublicHost)
getEventBusOptions()
and then EventBusOptions.setClusterPublicHost(String)
insteadclusterPublicHost
- the public host name to use@Deprecated public int getClusterPort()
getEventBusOptions()
and then EventBusOptions.getPort()
instead@Deprecated public VertxOptions setClusterPort(int clusterPort)
getEventBusOptions()
and then EventBusOptions.setPort(int)
insteadclusterPort
- the port@Deprecated public int getClusterPublicPort()
getEventBusOptions()
and then EventBusOptions.getClusterPublicPort()
instead@Deprecated public VertxOptions setClusterPublicPort(int clusterPublicPort)
getEventBusOptions()
and then EventBusOptions.setClusterPublicPort(int)
insteadsetClusterPublicHost(String)
for an explanation.clusterPublicPort
- the public port to use@Deprecated public long getClusterPingInterval()
getEventBusOptions()
and then EventBusOptions.getClusterPingInterval()
insteadNodes in the cluster ping each other at this interval to determine whether they are still running.
@Deprecated public VertxOptions setClusterPingInterval(long clusterPingInterval)
getEventBusOptions()
and then EventBusOptions.setClusterPingInterval(long)
insteadclusterPingInterval
- The value of cluster ping interval, in ms.@Deprecated public long getClusterPingReplyInterval()
getEventBusOptions()
and then EventBusOptions.getClusterPingReplyInterval()
insteadAfter sending a ping, if a pong is not received in this time, the node will be considered dead.
@Deprecated public VertxOptions setClusterPingReplyInterval(long clusterPingReplyInterval)
getEventBusOptions()
and then EventBusOptions.setClusterPingReplyInterval(long)
insteadclusterPingReplyInterval
- The value of cluster ping reply interval, in ms.public long getBlockedThreadCheckInterval()
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
.
blockedThreadCheckIntervalUnit
.public VertxOptions setBlockedThreadCheckInterval(long blockedThreadCheckInterval)
blockedThreadCheckIntervalUnit
.
The default value of blockedThreadCheckIntervalUnit
is TimeUnit.MILLISECONDS
blockedThreadCheckInterval
- the value of blocked thread check period, in blockedThreadCheckIntervalUnit
.public long getMaxEventLoopExecuteTime()
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
maxEventLoopExecuteTimeUnit
.public VertxOptions setMaxEventLoopExecuteTime(long maxEventLoopExecuteTime)
maxEventLoopExecuteTimeUnit
.
The default value of maxEventLoopExecuteTimeUnit
is TimeUnit.NANOSECONDS
maxEventLoopExecuteTime
- the value of max event loop execute time, in maxEventLoopExecuteTimeUnit
.public long getMaxWorkerExecuteTime()
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
maxWorkerExecuteTimeUnit
.public VertxOptions setMaxWorkerExecuteTime(long maxWorkerExecuteTime)
maxWorkerExecuteTimeUnit
.
The default value of maxWorkerExecuteTimeUnit
is TimeUnit.NANOSECONDS
maxWorkerExecuteTime
- the value of max worker execute time, in maxWorkerExecuteTimeUnit
.public ClusterManager getClusterManager()
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.
public VertxOptions setClusterManager(ClusterManager clusterManager)
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.
clusterManager
- the cluster managerpublic int getInternalBlockingPoolSize()
Vert.x maintains a pool for internal blocking operations
public VertxOptions setInternalBlockingPoolSize(int internalBlockingPoolSize)
internalBlockingPoolSize
- the maximumn number of threads in the internal blocking poolpublic boolean isHAEnabled()
public VertxOptions setHAEnabled(boolean haEnabled)
haEnabled
- true if enabled, false if not.public int getQuorumSize()
public VertxOptions setQuorumSize(int quorumSize)
quorumSize
- the quorum sizepublic String getHAGroup()
public VertxOptions setHAGroup(String haGroup)
haGroup
- the HA group to usepublic MetricsOptions getMetricsOptions()
public FileSystemOptions getFileSystemOptions()
public VertxOptions setMetricsOptions(MetricsOptions metrics)
metrics
- the optionspublic VertxOptions setFileSystemOptions(FileSystemOptions fileSystemOptions)
fileSystemOptions
- the optionspublic long getWarningExceptionTime()
warningExceptionTimeUnit
.
The default value of warningExceptionTimeUnit
is TimeUnit.NANOSECONDS
public VertxOptions setWarningExceptionTime(long warningExceptionTime)
warningExceptionTimeUnit
.
The default value of warningExceptionTimeUnit
is TimeUnit.NANOSECONDS
warningExceptionTime
- public EventBusOptions getEventBusOptions()
public VertxOptions setEventBusOptions(EventBusOptions options)
options
- the event bus optionspublic AddressResolverOptions getAddressResolverOptions()
public VertxOptions setAddressResolverOptions(AddressResolverOptions addressResolverOptions)
addressResolverOptions
- the address resolver options@Deprecated public boolean isFileResolverCachingEnabled()
getFileSystemOptions().isFileCachingEnabled()
instead@Deprecated public VertxOptions setFileResolverCachingEnabled(boolean fileResolverCachingEnabled)
getFileSystemOptions().setFileCachingEnabled(val)
insteadfileResolverCachingEnabled
- true when the file resolver caches resourcespublic boolean getPreferNativeTransport()
public VertxOptions setPreferNativeTransport(boolean preferNativeTransport)
preferNativeTransport
- true
to prefer the native transportpublic TimeUnit getMaxEventLoopExecuteTimeUnit()
maxEventLoopExecuteTime
public VertxOptions setMaxEventLoopExecuteTimeUnit(TimeUnit maxEventLoopExecuteTimeUnit)
maxEventLoopExecuteTime
.maxEventLoopExecuteTimeUnit
- the time unit of maxEventLoopExecuteTime
public TimeUnit getMaxWorkerExecuteTimeUnit()
maxWorkerExecuteTime
public VertxOptions setMaxWorkerExecuteTimeUnit(TimeUnit maxWorkerExecuteTimeUnit)
maxWorkerExecuteTime
.maxWorkerExecuteTimeUnit
- the time unit of maxWorkerExecuteTime
public TimeUnit getWarningExceptionTimeUnit()
warningExceptionTime
public VertxOptions setWarningExceptionTimeUnit(TimeUnit warningExceptionTimeUnit)
warningExceptionTime
.warningExceptionTimeUnit
- the time unit of warningExceptionTime
public TimeUnit getBlockedThreadCheckIntervalUnit()
blockedThreadCheckInterval
public VertxOptions setBlockedThreadCheckIntervalUnit(TimeUnit blockedThreadCheckIntervalUnit)
blockedThreadCheckInterval
.blockedThreadCheckIntervalUnit
- the time unit of warningExceptionTime
Copyright © 2023 Eclipse. All rights reserved.