Class SystemSettings

java.lang.Object
com.codingchili.core.configuration.system.SystemSettings
All Implemented Interfaces:
Configurable, Serializable

public class SystemSettings extends Object implements Configurable
Contains settings for the core system.
See Also:
Serialized Form
  • Constructor Details

    • SystemSettings

      public SystemSettings()
  • Method Details

    • getPath

      public String getPath()
      Description copied from interface: Configurable
      Get the path of a loaded configuration file.
      Specified by:
      getPath in interface Configurable
      Returns:
      the directory path to the configuration file.
    • getMetrics

      public MetricSettings getMetrics()
      Returns:
      metric settings with paths and includes.
    • setMetrics

      public void setMetrics(MetricSettings metrics)
    • getHandlers

      public int getHandlers()
      Returns:
      the number of handlers to deploy for each name.
    • setHandlers

      public SystemSettings setHandlers(int handlers)
      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

      public SystemSettings setDeployTimeout(int deployTimeout)
      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

      public SystemSettings setShutdownHookTimeout(int shutdownHookTimeout)
      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

      public SystemSettings setOptions(io.vertx.core.VertxOptions options)
    • isConsoleLogging

      public boolean isConsoleLogging()
      Returns:
      true if allowed to log to console.
    • setConsoleLogging

      public SystemSettings setConsoleLogging(boolean consoleLogging)
      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

      public SystemSettings setConfigurationPoll(int configurationPoll)
      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

      public SystemSettings setCachedFilePoll(int cachedFilePoll)
      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

      public SystemSettings setWorkerPoolSize(int workerPoolSize)
      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

      public SystemSettings setClusterTimeout(int clusterTimeout)
      Parameters:
      clusterTimeout - cluster timeout in seconds
      Returns:
      fluent
    • getListeners

      public int getListeners()
    • setListeners

      public SystemSettings setListeners(int listeners)
      Parameters:
      listeners - number of listeners to deploy by default
      Returns:
      fluent
    • getServices

      public int getServices()
    • setServices

      public SystemSettings setServices(int services)
      Parameters:
      services - number of services to deploy by default
      Returns:
      fluent
    • isUnsafe

      public boolean isUnsafe()
    • setUnsafe

      public void setUnsafe(Boolean unsafe)
      Parameters:
      unsafe - true if access to Unsafe should be attempted. this will trigger a warning on most recent JVM's.