Class SystemSettings
java.lang.Object
com.codingchili.core.configuration.system.SystemSettings
- All Implemented Interfaces:
Configurable
,Serializable
Contains settings for the core system.
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
int
int
int
int
int
int
long
io.vertx.core.VertxOptions
getPath()
Get the path of a loaded configuration file.int
int
int
boolean
boolean
isUnsafe()
void
setBlockedThreadChecker(long blockedThreadChecker)
setCachedFilePoll(int cachedFilePoll)
setClusterTimeout(int clusterTimeout)
setConfigurationPoll(int configurationPoll)
setConsoleLogging(boolean consoleLogging)
setDeployTimeout(int deployTimeout)
setHandlers(int handlers)
setListeners(int listeners)
void
setMaxEventLoopExecuteTime(long maxEventLoopExecuteTime)
void
setMetrics(MetricSettings metrics)
setOptions(io.vertx.core.VertxOptions options)
setServices(int services)
setShutdownHookTimeout(int shutdownHookTimeout)
void
setWorkerPoolSize(int workerPoolSize)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.codingchili.core.configuration.Configurable
save, serialize, setPath
-
Constructor Details
-
SystemSettings
public SystemSettings()
-
-
Method Details
-
getPath
Description copied from interface:Configurable
Get the path of a loaded configuration file.- Specified by:
getPath
in interfaceConfigurable
- Returns:
- the directory path to the configuration file.
-
getMetrics
- Returns:
- metric settings with paths and includes.
-
setMetrics
-
getHandlers
public int getHandlers()- Returns:
- the number of handlers to deploy for each name.
-
setHandlers
- Parameters:
handlers
- get the number of handlers to deploy for each name. This is a recommendation based on the available processors.- Returns:
- fluent
-
getDeployTimeout
public int getDeployTimeout()- Returns:
- the time in MS for a deploy to time out and fail.
-
setDeployTimeout
- Parameters:
deployTimeout
- the time in MS for a deploy to time out and fail.- Returns:
- fluent
-
getShutdownHookTimeout
public int getShutdownHookTimeout()- Returns:
- get the total timeout in MS for the shutdown-hook to complete.
-
setShutdownHookTimeout
- Parameters:
shutdownHookTimeout
- set the shutdown hook timeout in MS.- Returns:
- fluent
-
getBlockedThreadChecker
public long getBlockedThreadChecker()- Returns:
- the number of milliseconds to wait before logging an error if an event loop thread is blocked.
-
setBlockedThreadChecker
public void setBlockedThreadChecker(long blockedThreadChecker)- Parameters:
blockedThreadChecker
- sets the number of milliseconds to wait before logging an error if an event loop thread is blocked.
-
getMaxEventLoopExecuteTime
public long getMaxEventLoopExecuteTime()- Returns:
- the max event loop execute time the blocked thread checker uses in milliseconds.
-
setMaxEventLoopExecuteTime
public void setMaxEventLoopExecuteTime(long maxEventLoopExecuteTime)- Parameters:
maxEventLoopExecuteTime
- the number of milliseconds the event loop can block without having the blocked-thread-checker generate warning.
-
getOptions
public io.vertx.core.VertxOptions getOptions()- Returns:
- a set of VertxOptions used for deployment.
-
setOptions
-
isConsoleLogging
public boolean isConsoleLogging()- Returns:
- true if allowed to log to console.
-
setConsoleLogging
- Parameters:
consoleLogging
- indicates if logging to console is allowed.- Returns:
- fluent
-
getConfigurationPoll
public int getConfigurationPoll()- Returns:
- get the interval in MS in which configurations are checked for changes.
-
setConfigurationPoll
- Parameters:
configurationPoll
- set the interval time in MS which configuration files are checked for changes.- Returns:
- fluent
-
getCachedFilePoll
public int getCachedFilePoll()- Returns:
- get the interval in MS for which files that are cached are refreshed.
-
setCachedFilePoll
- Parameters:
cachedFilePoll
- set the time in ms for which files that are cached are refreshed.- Returns:
- fluent
-
getWorkerPoolSize
public int getWorkerPoolSize()- Returns:
- the number of workers in the worker pool.
-
setWorkerPoolSize
- Parameters:
workerPoolSize
- sets the number of workers in worker pools. must be called before the launcher is invoked.- Returns:
- fluent
-
getClusterTimeout
public int getClusterTimeout() -
setClusterTimeout
- Parameters:
clusterTimeout
- cluster timeout in seconds- Returns:
- fluent
-
getListeners
public int getListeners() -
setListeners
- Parameters:
listeners
- number of listeners to deploy by default- Returns:
- fluent
-
getServices
public int getServices() -
setServices
- Parameters:
services
- number of services to deploy by default- Returns:
- fluent
-
isUnsafe
public boolean isUnsafe() -
setUnsafe
- Parameters:
unsafe
- true if access to Unsafe should be attempted. this will trigger a warning on most recent JVM's.
-