Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL
The default value of blocked thread check interval = 1000 ms.
|
static String |
DEFAULT_CLUSTER_HOST
The default hostname to use when clustering = "localhost"
|
static long |
DEFAULT_CLUSTER_PING_INTERVAL
The default value of cluster ping interval = 20000 ms.
|
static long |
DEFAULT_CLUSTER_PING_REPLY_INTERVAL
The default value of cluster ping reply interval = 20000 ms.
|
static int |
DEFAULT_CLUSTER_PORT
The default port to use when clustering = 0 (meaning assign a random port)
|
static boolean |
DEFAULT_CLUSTERED
The default value of whether Vert.x is clustered = false.
|
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 long |
DEFAULT_MAX_WORKER_EXECUTE_TIME
The default value of max worker execute time = 60000000000 ns (60 seconds)
|
static boolean |
DEFAULT_METRICS_ENABLED
The default value of metrics enabled false
|
static int |
DEFAULT_QUORUM_SIZE
The default value of quorum size = 1
|
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) |
long |
getBlockedThreadCheckInterval()
Get the value of blocked thread check period, in ms.
|
String |
getClusterHost()
Get the host name to be used for clustering.
|
ClusterManager |
getClusterManager()
Get the cluster manager to be used when clustering.
|
long |
getClusterPingInterval()
Get the value of cluster ping interval, in ms.
|
long |
getClusterPingReplyInterval()
Get the value of cluster ping reply interval, in ms.
|
int |
getClusterPort()
Get the port to be used for clustering
|
int |
getEventLoopPoolSize()
Get the number of event loop threads to be used by the Vert.x instance.
|
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 ns.
|
long |
getMaxWorkerExecuteTime()
Get the value of max worker execute time, in ns.
|
MetricsOptions |
getMetricsOptions() |
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.
|
int |
getWorkerPoolSize()
Get the maximum number of worker threads to be used by the Vert.x instance.
|
int |
hashCode() |
boolean |
isClustered()
Is the Vert.x instance clustered?
|
boolean |
isHAEnabled()
Will HA be enabled on the Vert.x instance?
|
VertxOptions |
setBlockedThreadCheckInterval(long blockedThreadCheckInterval)
Sets the value of blocked thread check period, in ms.
|
VertxOptions |
setClustered(boolean clustered)
Set whether or not the Vert.x instance will be clustered.
|
VertxOptions |
setClusterHost(String clusterHost)
Set the hostname to be used for clustering.
|
VertxOptions |
setClusterManager(ClusterManager clusterManager)
Programmatically set the cluster manager to be used when clustering.
|
VertxOptions |
setClusterPingInterval(long clusterPingInterval)
Set the value of cluster ping interval, in ms.
|
VertxOptions |
setClusterPingReplyInterval(long clusterPingReplyInterval)
Set the value of cluster ping reply interval, in ms.
|
VertxOptions |
setClusterPort(int clusterPort)
Set the port to be used for clustering.
|
VertxOptions |
setEventLoopPoolSize(int eventLoopPoolSize)
Set the number of event loop threads to be used by the Vert.x instance.
|
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 ns.
|
VertxOptions |
setMaxWorkerExecuteTime(long maxWorkerExecuteTime)
Sets the value of max worker execute time, in ns.
|
VertxOptions |
setMetricsOptions(MetricsOptions metrics)
Set the metrics options
|
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 |
setWorkerPoolSize(int workerPoolSize)
Set the maximum number of worker threads to be used by the Vert.x instance.
|
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
public static final boolean DEFAULT_CLUSTERED
public static final String DEFAULT_CLUSTER_HOST
public static final int DEFAULT_CLUSTER_PORT
public static final long DEFAULT_CLUSTER_PING_INTERVAL
public static final long DEFAULT_CLUSTER_PING_REPLY_INTERVAL
public static final long DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL
public static final long DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME
public static final long DEFAULT_MAX_WORKER_EXECUTE_TIME
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_METRICS_ENABLED
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 threadspublic boolean isClustered()
public VertxOptions setClustered(boolean clustered)
clustered
- if true, the Vert.x instance will be clustered, otherwise notpublic String getClusterHost()
public VertxOptions setClusterHost(String clusterHost)
clusterHost
- the host name to usepublic int getClusterPort()
public VertxOptions setClusterPort(int clusterPort)
clusterPort
- the portpublic long getClusterPingInterval()
Nodes in the cluster ping each other at this interval to determine whether they are still running.
public VertxOptions setClusterPingInterval(long clusterPingInterval)
clusterPingInterval
- The value of cluster ping interval, in ms.public long getClusterPingReplyInterval()
After sending a ping, if a pong is not received in this time, the node will be considered dead.
public VertxOptions setClusterPingReplyInterval(long clusterPingReplyInterval)
clusterPingReplyInterval
- The value of cluster ping reply interval, in ms.public long getBlockedThreadCheckInterval()
This setting determines how often Vert.x will check whether event loop threads are executing for too long.
public VertxOptions setBlockedThreadCheckInterval(long blockedThreadCheckInterval)
blockedThreadCheckInterval
- the value of blocked thread check period, in ms.public long getMaxEventLoopExecuteTime()
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.
public VertxOptions setMaxEventLoopExecuteTime(long maxEventLoopExecuteTime)
maxEventLoopExecuteTime
- the value of max event loop execute time, in ms.public long getMaxWorkerExecuteTime()
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.
public VertxOptions setMaxWorkerExecuteTime(long maxWorkerExecuteTime)
maxWorkerExecuteTime
- the value of max worker execute time, in ms.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 VertxOptions setMetricsOptions(MetricsOptions metrics)
metrics
- the optionspublic long getWarningExceptionTime()
public VertxOptions setWarningExceptionTime(long warningExceptionTime)
warningExceptionTime
- Copyright © 2015. All Rights Reserved.