Package io.vertigo.core.node.config
Class BootConfigBuilder
java.lang.Object
io.vertigo.core.node.config.BootConfigBuilder
- All Implemented Interfaces:
Builder<BootConfig>
Configuration.
- Author:
- npiedeloup, pchretien
-
Method Summary
Modifier and TypeMethodDescriptionaddAnalyticsConnectorPlugin(Class<? extends AnalyticsConnectorPlugin> analyticsConnectorPluginClass, Param... params) Adds a AnalyticsConnectorPluginaddPlugin(PluginConfig pluginConfig) Adds a plugin defined by its builder.Adds a plugin defined by its implementation.build()Builds and returns the final object.verbose()Enables verbosity during startupwithAopEngine(AspectPlugin aopPlugin) withDaemonMaxDurationInSeconds(int daemonMaxDurationInSeconds) Sets the maximum duration a daemon may run : beyond, it should be an Orchestra job.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).withDaemonPoolSize(int threadPoolSize) Sets the number of threads of the daemon pool.withLocales(String locales) Opens the boot module.withLocalesAndDefaultZoneId(String locales, String defaultZoneId) Opens the boot module.withLogConfig(LogConfig logConfig) Ajout de paramètreswithSmartLoggerAnalyticsConnector(Param... params) withSocketLoggerAnalyticsConnector(Param... params)
-
Method Details
-
withLocales
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
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
Ajout de paramètres- Parameters:
logConfig- Config of logs- Returns:
- this builder
-
verbose
Enables verbosity during startup- Returns:
- this builder
-
withAopEngine
- Parameters:
aopPlugin- AopPlugin- Returns:
- this builder
-
withSocketLoggerAnalyticsConnector
-
withSmartLoggerAnalyticsConnector
-
withDaemonPoolSize
Sets the number of threads of the daemon pool.- Parameters:
threadPoolSize- the number of threads (default 2)- Returns:
- this builder
-
withDaemonMinDurationInSeconds
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
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 useparams- the params- Returns:
- these features
-
addPlugin
Adds a plugin defined by its implementation.- Parameters:
pluginImplClass- impl of the pluginparams- the list of params- Returns:
- this builder
-
addPlugin
Adds a plugin defined by its builder.- Parameters:
pluginConfig- the plugin-config- Returns:
- this builder
-
build
Description copied from interface:BuilderBuilds and returns the final object.- Specified by:
buildin interfaceBuilder<BootConfig>- Returns:
- BootConfig
-