Class DefaultPersistenceConfig
java.lang.Object
org.eclipse.ditto.internal.utils.health.config.DefaultPersistenceConfig
- All Implemented Interfaces:
PersistenceConfig
This class is the default implementation of the health check persistence config.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.ditto.internal.utils.health.config.PersistenceConfig
PersistenceConfig.PersistenceConfigValue -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the configuration settings of the metrics reporter.Returns the timeout of the health check for persistence.inthashCode()booleanIndicates whether the persistence health check should be enabled.static DefaultPersistenceConfigof(com.typesafe.config.Config config) Returns an instance ofDefaultPersistenceConfigbased on the settings of the specified Config.toString()
-
Method Details
-
of
Returns an instance ofDefaultPersistenceConfigbased on the settings of the specified Config.- Parameters:
config- is supposed to provide the settings of the persistence config at "persistence".- Returns:
- the instance.
- Throws:
DittoConfigError- ifconfigis invalid.
-
isEnabled
public boolean isEnabled()Description copied from interface:PersistenceConfigIndicates whether the persistence health check should be enabled.- Specified by:
isEnabledin interfacePersistenceConfig- Returns:
trueif the persistence health check should be enabled,falseelse.
-
getTimeout
Description copied from interface:PersistenceConfigReturns the timeout of the health check for persistence. If the persistence takes longer than that to respond, it is considered "DOWN".- Specified by:
getTimeoutin interfacePersistenceConfig- Returns:
- the timeout of the health check for persistence.
- See Also:
-
getMetricsReporterConfig
Description copied from interface:PersistenceConfigReturns the configuration settings of the metrics reporter.- Specified by:
getMetricsReporterConfigin interfacePersistenceConfig- Returns:
- the config.
-
equals
-
hashCode
public int hashCode() -
toString
-