Class BootConfigBuilder

java.lang.Object
io.vertigo.core.node.config.BootConfigBuilder
All Implemented Interfaces:
Builder<BootConfig>

public final class BootConfigBuilder extends Object implements Builder<BootConfig>
Configuration.
Author:
npiedeloup, pchretien
  • Method Details

    • withLocales

      public BootConfigBuilder withLocales(String locales)
      Opens the boot module. There is exactly one BootConfig per NodeConfig.
      Parameters:
      locales - a string which contains all the locales separated with a simple comma : ',' .
      Returns:
      this builder
    • withLocalesAndDefaultZoneId

      public BootConfigBuilder withLocalesAndDefaultZoneId(String locales, String defaultZoneId)
      Opens the boot module. There is exactly one BootConfig per NodeConfig. With a default ZoneId for DateTime formatter.
      Parameters:
      locales - a string which contains all the locales separated with a simple comma : ',' .
      defaultZoneId - a string which contains defaultZoneId.
      Returns:
      this builder
    • withLogConfig

      public BootConfigBuilder withLogConfig(LogConfig logConfig)
      Ajout de paramètres
      Parameters:
      logConfig - Config of logs
      Returns:
      this builder
    • verbose

      public BootConfigBuilder verbose()
      Enables verbosity during startup
      Returns:
      this builder
    • withAopEngine

      public BootConfigBuilder withAopEngine(AspectPlugin aopPlugin)
      Parameters:
      aopPlugin - AopPlugin
      Returns:
      this builder
    • withSocketLoggerAnalyticsConnector

      public BootConfigBuilder withSocketLoggerAnalyticsConnector(Param... params)
    • withSmartLoggerAnalyticsConnector

      public BootConfigBuilder withSmartLoggerAnalyticsConnector(Param... params)
    • withDaemonPoolSize

      public BootConfigBuilder withDaemonPoolSize(int threadPoolSize)
      Sets the number of threads of the daemon pool.
      Parameters:
      threadPoolSize - the number of threads (default 2)
      Returns:
      this builder
    • withDaemonMinDurationInSeconds

      public BootConfigBuilder withDaemonMinDurationInSeconds(int daemonMinDurationInSeconds)
      Sets the minimum duration before judging that a daemon has a problem (running too long, or waiting too long for a free thread). It protects frequent daemons from normal jitter : a 1s daemon is only reported after this duration. The problem threshold of a daemon is min(max(4 x period, minDuration), maxDuration).
      Parameters:
      daemonMinDurationInSeconds - the minimum duration in seconds (default 120)
      Returns:
      this builder
    • withDaemonMaxDurationInSeconds

      public BootConfigBuilder withDaemonMaxDurationInSeconds(int daemonMaxDurationInSeconds)
      Sets the maximum duration a daemon may run : beyond, it should be an Orchestra job. It caps the problem threshold of long-period daemons, and a daemon waiting twice this duration for a free thread means the daemon engine is broken (health RED).
      Parameters:
      daemonMaxDurationInSeconds - the maximum duration in seconds (default 7200)
      Returns:
      this builder
    • addAnalyticsConnectorPlugin

      public BootConfigBuilder addAnalyticsConnectorPlugin(Class<? extends AnalyticsConnectorPlugin> analyticsConnectorPluginClass, Param... params)
      Adds a AnalyticsConnectorPlugin
      Parameters:
      analyticsConnectorPluginClass - the plugin to use
      params - the params
      Returns:
      these features
    • addPlugin

      public BootConfigBuilder addPlugin(Class<? extends Plugin> pluginImplClass, Param... params)
      Adds a plugin defined by its implementation.
      Parameters:
      pluginImplClass - impl of the plugin
      params - the list of params
      Returns:
      this builder
    • addPlugin

      public BootConfigBuilder addPlugin(PluginConfig pluginConfig)
      Adds a plugin defined by its builder.
      Parameters:
      pluginConfig - the plugin-config
      Returns:
      this builder
    • build

      public BootConfig build()
      Description copied from interface: Builder
      Builds and returns the final object.
      Specified by:
      build in interface Builder<BootConfig>
      Returns:
      BootConfig