open class VertxOptions
Instances of this class are used to configure io.vertx.core.Vertx instances.
Author
Tim Fox
VertxOptions()
Default constructor VertxOptions(other: VertxOptions)
Copy constructor VertxOptions(json: JsonObject)
Create an instance from a io.vertx.core.json.JsonObject |
static val DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL: Long
The default value of blocked thread check interval = 1000 ms. |
|
static val DEFAULT_CLUSTERED: Boolean
The default value of whether Vert.x is clustered = false. |
|
static val DEFAULT_CLUSTER_HOST: String
The default hostname to use when clustering = "localhost" |
|
static val DEFAULT_CLUSTER_PING_INTERVAL: Long
The default value of cluster ping interval = 20000 ms. |
|
static val DEFAULT_CLUSTER_PING_REPLY_INTERVAL: Long
The default value of cluster ping reply interval = 20000 ms. |
|
static val DEFAULT_CLUSTER_PORT: Int
The default port to use when clustering = 0 (meaning assign a random port) |
|
static val DEFAULT_CLUSTER_PUBLIC_HOST: String
The default cluster public host to use = null which means use the same as the cluster host |
|
static val DEFAULT_CLUSTER_PUBLIC_PORT: Int
The default cluster public port to use = -1 which means use the same as the cluster port |
|
static val DEFAULT_EVENT_LOOP_POOL_SIZE: Int
The default number of event loop threads to be used = 2 * number of cores on the machine |
|
static val DEFAULT_FILE_CACHING_ENABLED: Boolean
The default value for file resolver caching enabled = the value of the system property "vertx.disableFileCaching" or true |
|
static val DEFAULT_HA_ENABLED: Boolean
The default value of HA enabled = false |
|
static val DEFAULT_HA_GROUP: String
The default value of Ha group is "__DEFAULT__" |
|
static val DEFAULT_INTERNAL_BLOCKING_POOL_SIZE: Int
The default number of threads in the internal blocking pool (used by some internal operations) = 20 |
|
static val DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME: Long
The default value of max event loop execute time = 2000000000 ns (2 seconds) |
|
static val DEFAULT_MAX_WORKER_EXECUTE_TIME: Long
The default value of max worker execute time = 60000000000 ns (60 seconds) |
|
static val DEFAULT_PREFER_NATIVE_TRANSPORT: Boolean
The default value for preferring native transport = false |
|
static val DEFAULT_QUORUM_SIZE: Int
The default value of quorum size = 1 |
|
static val DEFAULT_WORKER_POOL_SIZE: Int
The default number of threads in the worker pool = 20 |
open fun equals(other: Any?): Boolean |
|
open fun getAddressResolverOptions(): AddressResolverOptions |
|
open fun getBlockedThreadCheckInterval(): Long
Get the value of blocked thread check period, in ms. This setting determines how often Vert.x will check whether event loop threads are executing for too long. |
|
open fun getClusterHost(): String
Get the host name to be used for clustering. |
|
open fun getClusterManager(): ClusterManager
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. |
|
open fun getClusterPingInterval(): Long
Get the value of cluster ping interval, in ms. Nodes in the cluster ping each other at this interval to determine whether they are still running. |
|
open fun getClusterPingReplyInterval(): Long
Get the value of cluster ping reply interval, in ms. After sending a ping, if a pong is not received in this time, the node will be considered dead. |
|
open fun getClusterPort(): Int
Get the port to be used for clustering |
|
open fun getClusterPublicHost(): String
Get the public facing hostname to be used when clustering. |
|
open fun getClusterPublicPort(): Int
Get the public facing port to be used when clustering. |
|
open fun getEventBusOptions(): EventBusOptions |
|
open fun getEventLoopPoolSize(): Int
Get the number of event loop threads to be used by the Vert.x instance. |
|
open fun getHAGroup(): String
Get the HA group to be used when HA is enabled. |
|
open fun getInternalBlockingPoolSize(): Int
Get the value of internal blocking pool size. Vert.x maintains a pool for internal blocking operations |
|
open fun getMaxEventLoopExecuteTime(): Long
Get the value of max event loop execute time, in ns. 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. |
|
open fun getMaxWorkerExecuteTime(): Long
Get the value of max worker execute time, in ns. 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. |
|
open fun getMetricsOptions(): MetricsOptions |
|
open fun getPreferNativeTransport(): Boolean |
|
open fun getQuorumSize(): Int
Get the quorum size to be used when HA is enabled. |
|
open fun getWarningExceptionTime(): Long
Get the threshold value above this, the blocked warning contains a stack trace. |
|
open fun getWorkerPoolSize(): Int
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. |
|
open fun hashCode(): Int |
|
open fun isClustered(): Boolean
Is the Vert.x instance clustered? |
|
open fun isFileResolverCachingEnabled(): Boolean |
|
open fun isHAEnabled(): Boolean
Will HA be enabled on the Vert.x instance? |
|
open fun setAddressResolverOptions(addressResolverOptions: AddressResolverOptions): VertxOptions
Sets the address resolver configuration to configure resolving DNS servers, cache TTL, etc... |
|
open fun setBlockedThreadCheckInterval(blockedThreadCheckInterval: Long): VertxOptions
Sets the value of blocked thread check period, in ms. |
|
open fun setClusterHost(clusterHost: String): VertxOptions
Set the hostname to be used for clustering. |
|
open fun setClusterManager(clusterManager: ClusterManager): VertxOptions
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. |
|
open fun setClusterPingInterval(clusterPingInterval: Long): VertxOptions
Set the value of cluster ping interval, in ms. |
|
open fun setClusterPingReplyInterval(clusterPingReplyInterval: Long): VertxOptions
Set the value of cluster ping reply interval, in ms. |
|
open fun setClusterPort(clusterPort: Int): VertxOptions
Set the port to be used for clustering. |
|
open fun setClusterPublicHost(clusterPublicHost: String): VertxOptions
Set the public facing hostname to be used for clustering. Sometimes, e.g. when running on certain clouds, the local address the server listens on for clustering is not the same address that other nodes connect to it at, as the OS / cloud infrastructure does some kind of proxying. If this is the case you can specify a public hostname which is different from the hostname the server listens at. The default value is null which means use the same as the cluster hostname. |
|
open fun setClusterPublicPort(clusterPublicPort: Int): VertxOptions
See |
|
open fun setClustered(clustered: Boolean): VertxOptions
Set whether or not the Vert.x instance will be clustered. |
|
open fun setEventBusOptions(options: EventBusOptions): VertxOptions
Sets the event bus configuration to configure the host, port, ssl... |
|
open fun setEventLoopPoolSize(eventLoopPoolSize: Int): VertxOptions
Set the number of event loop threads to be used by the Vert.x instance. |
|
open fun setFileResolverCachingEnabled(fileResolverCachingEnabled: Boolean): VertxOptions
Set wether the Vert.x file resolver uses caching for classpath resources. |
|
open fun setHAEnabled(haEnabled: Boolean): VertxOptions
Set whether HA will be enabled on the Vert.x instance. |
|
open fun setHAGroup(haGroup: String): VertxOptions
Set the HA group to be used when HA is enabled. |
|
open fun setInternalBlockingPoolSize(internalBlockingPoolSize: Int): VertxOptions
Set the value of internal blocking pool size |
|
open fun setMaxEventLoopExecuteTime(maxEventLoopExecuteTime: Long): VertxOptions
Sets the value of max event loop execute time, in ns. |
|
open fun setMaxWorkerExecuteTime(maxWorkerExecuteTime: Long): VertxOptions
Sets the value of max worker execute time, in ns. |
|
open fun setMetricsOptions(metrics: MetricsOptions): VertxOptions
Set the metrics options |
|
open fun setPreferNativeTransport(preferNativeTransport: Boolean): VertxOptions
Set wether to prefer the native transport to the JDK transport. |
|
open fun setQuorumSize(quorumSize: Int): VertxOptions
Set the quorum size to be used when HA is enabled. |
|
open fun setWarningExceptionTime(warningExceptionTime: Long): VertxOptions
Set the threshold value above this, the blocked warning contains a stack trace. |
|
open fun setWorkerPoolSize(workerPoolSize: Int): VertxOptions
Set the maximum number of worker threads to be used by the Vert.x instance. |
|
open fun toString(): String |