vertx / io.vertx.core / VertxOptions

# VertxOptions

`open class VertxOptions`

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

Author
Tim Fox

### Constructors

<init> | `VertxOptions()` Default constructor `VertxOptions(other: VertxOptions)` Copy constructor `VertxOptions(json: JsonObject)` Create an instance from a io.vertx.core.json.JsonObject

### Properties

DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL | `static val DEFAULT_BLOCKED_THREAD_CHECK_INTERVAL: Long` The default value of blocked thread check interval = 1000 ms.
DEFAULT_CLUSTERED | `static val DEFAULT_CLUSTERED: Boolean` The default value of whether Vert.x is clustered = false.
DEFAULT_CLUSTER_HOST | `static val DEFAULT_CLUSTER_HOST: String` The default hostname to use when clustering = "localhost"
DEFAULT_CLUSTER_PING_INTERVAL | `static val DEFAULT_CLUSTER_PING_INTERVAL: Long` The default value of cluster ping interval = 20000 ms.
DEFAULT_CLUSTER_PING_REPLY_INTERVAL | `static val DEFAULT_CLUSTER_PING_REPLY_INTERVAL: Long` The default value of cluster ping reply interval = 20000 ms.
DEFAULT_CLUSTER_PORT | `static val DEFAULT_CLUSTER_PORT: Int` The default port to use when clustering = 0 (meaning assign a random port)
DEFAULT_CLUSTER_PUBLIC_HOST | `static val DEFAULT_CLUSTER_PUBLIC_HOST: String` The default cluster public host to use = null which means use the same as the cluster host
DEFAULT_CLUSTER_PUBLIC_PORT | `static val DEFAULT_CLUSTER_PUBLIC_PORT: Int` The default cluster public port to use = -1 which means use the same as the cluster port
DEFAULT_EVENT_LOOP_POOL_SIZE | `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
DEFAULT_FILE_CACHING_ENABLED | `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
DEFAULT_HA_ENABLED | `static val DEFAULT_HA_ENABLED: Boolean` The default value of HA enabled = false
DEFAULT_HA_GROUP | `static val DEFAULT_HA_GROUP: String` The default value of Ha group is "__DEFAULT__"
DEFAULT_INTERNAL_BLOCKING_POOL_SIZE | `static val DEFAULT_INTERNAL_BLOCKING_POOL_SIZE: Int` The default number of threads in the internal blocking pool (used by some internal operations) = 20
DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME | `static val DEFAULT_MAX_EVENT_LOOP_EXECUTE_TIME: Long` The default value of max event loop execute time = 2000000000 ns (2 seconds)
DEFAULT_MAX_WORKER_EXECUTE_TIME | `static val DEFAULT_MAX_WORKER_EXECUTE_TIME: Long` The default value of max worker execute time = 60000000000 ns (60 seconds)
DEFAULT_PREFER_NATIVE_TRANSPORT | `static val DEFAULT_PREFER_NATIVE_TRANSPORT: Boolean` The default value for preferring native transport = false
DEFAULT_QUORUM_SIZE | `static val DEFAULT_QUORUM_SIZE: Int` The default value of quorum size = 1
DEFAULT_WORKER_POOL_SIZE | `static val DEFAULT_WORKER_POOL_SIZE: Int` The default number of threads in the worker pool = 20

### Functions

equals | `open fun equals(other: Any?): Boolean`
getAddressResolverOptions | `open fun getAddressResolverOptions(): AddressResolverOptions`
getBlockedThreadCheckInterval | `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.
getClusterHost | `open fun getClusterHost(): String` Get the host name to be used for clustering.
getClusterManager | `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.
getClusterPingInterval | `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.
getClusterPingReplyInterval | `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.
getClusterPort | `open fun getClusterPort(): Int` Get the port to be used for clustering
getClusterPublicHost | `open fun getClusterPublicHost(): String` Get the public facing hostname to be used when clustering.
getClusterPublicPort | `open fun getClusterPublicPort(): Int` Get the public facing port to be used when clustering.
getEventBusOptions | `open fun getEventBusOptions(): EventBusOptions`
getEventLoopPoolSize | `open fun getEventLoopPoolSize(): Int` Get the number of event loop threads to be used by the Vert.x instance.
getHAGroup | `open fun getHAGroup(): String` Get the HA group to be used when HA is enabled.
getInternalBlockingPoolSize | `open fun getInternalBlockingPoolSize(): Int` Get the value of internal blocking pool size. Vert.x maintains a pool for internal blocking operations
getMaxEventLoopExecuteTime | `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.
getMaxWorkerExecuteTime | `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.
getMetricsOptions | `open fun getMetricsOptions(): MetricsOptions`
getPreferNativeTransport | `open fun getPreferNativeTransport(): Boolean`
getQuorumSize | `open fun getQuorumSize(): Int` Get the quorum size to be used when HA is enabled.
getWarningExceptionTime | `open fun getWarningExceptionTime(): Long` Get the threshold value above this, the blocked warning contains a stack trace.
getWorkerPoolSize | `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.
hashCode | `open fun hashCode(): Int`
isClustered | `open fun isClustered(): Boolean` Is the Vert.x instance clustered?
isFileResolverCachingEnabled | `open fun isFileResolverCachingEnabled(): Boolean`
isHAEnabled | `open fun isHAEnabled(): Boolean` Will HA be enabled on the Vert.x instance?
setAddressResolverOptions | `open fun setAddressResolverOptions(addressResolverOptions: AddressResolverOptions): VertxOptions` Sets the address resolver configuration to configure resolving DNS servers, cache TTL, etc...
setBlockedThreadCheckInterval | `open fun setBlockedThreadCheckInterval(blockedThreadCheckInterval: Long): VertxOptions` Sets the value of blocked thread check period, in ms.
setClusterHost | `open fun setClusterHost(clusterHost: String): VertxOptions` Set the hostname to be used for clustering.
setClusterManager | `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.
setClusterPingInterval | `open fun setClusterPingInterval(clusterPingInterval: Long): VertxOptions` Set the value of cluster ping interval, in ms.
setClusterPingReplyInterval | `open fun setClusterPingReplyInterval(clusterPingReplyInterval: Long): VertxOptions` Set the value of cluster ping reply interval, in ms.
setClusterPort | `open fun setClusterPort(clusterPort: Int): VertxOptions` Set the port to be used for clustering.
setClusterPublicHost | `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.
setClusterPublicPort | `open fun setClusterPublicPort(clusterPublicPort: Int): VertxOptions` See `#setClusterPublicHost(String)` for an explanation.
setClustered | `open fun setClustered(clustered: Boolean): VertxOptions` Set whether or not the Vert.x instance will be clustered.
setEventBusOptions | `open fun setEventBusOptions(options: EventBusOptions): VertxOptions` Sets the event bus configuration to configure the host, port, ssl...
setEventLoopPoolSize | `open fun setEventLoopPoolSize(eventLoopPoolSize: Int): VertxOptions` Set the number of event loop threads to be used by the Vert.x instance.
setFileResolverCachingEnabled | `open fun setFileResolverCachingEnabled(fileResolverCachingEnabled: Boolean): VertxOptions` Set wether the Vert.x file resolver uses caching for classpath resources.
setHAEnabled | `open fun setHAEnabled(haEnabled: Boolean): VertxOptions` Set whether HA will be enabled on the Vert.x instance.
setHAGroup | `open fun setHAGroup(haGroup: String): VertxOptions` Set the HA group to be used when HA is enabled.
setInternalBlockingPoolSize | `open fun setInternalBlockingPoolSize(internalBlockingPoolSize: Int): VertxOptions` Set the value of internal blocking pool size
setMaxEventLoopExecuteTime | `open fun setMaxEventLoopExecuteTime(maxEventLoopExecuteTime: Long): VertxOptions` Sets the value of max event loop execute time, in ns.
setMaxWorkerExecuteTime | `open fun setMaxWorkerExecuteTime(maxWorkerExecuteTime: Long): VertxOptions` Sets the value of max worker execute time, in ns.
setMetricsOptions | `open fun setMetricsOptions(metrics: MetricsOptions): VertxOptions` Set the metrics options
setPreferNativeTransport | `open fun setPreferNativeTransport(preferNativeTransport: Boolean): VertxOptions` Set wether to prefer the native transport to the JDK transport.
setQuorumSize | `open fun setQuorumSize(quorumSize: Int): VertxOptions` Set the quorum size to be used when HA is enabled.
setWarningExceptionTime | `open fun setWarningExceptionTime(warningExceptionTime: Long): VertxOptions` Set the threshold value above this, the blocked warning contains a stack trace.
setWorkerPoolSize | `open fun setWorkerPoolSize(workerPoolSize: Int): VertxOptions` Set the maximum number of worker threads to be used by the Vert.x instance.
toString | `open fun toString(): String`