Package com.suse.coco.configuration
Class DefaultConfiguration
java.lang.Object
com.suse.coco.configuration.DefaultConfiguration
- All Implemented Interfaces:
Configuration
Default application configuration. Values are first read from the environment then from a property file
which defines the default values. A part for the mandatory properties, all the settings should have a value
inside the property file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.suse.common.configuration.ConfigurationSource -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault constructorprotectedDefaultConfiguration(com.suse.common.configuration.ConfigurationSource configSource) -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the number of attestation results to process at a time.intRetrieves the number of core threads for the queue processorRetrieves the connection stringRetrieves the database hostname stringRetrieves the database name stringRetrieves the database passwordintRetrieves the database port integerRetrieve the database userintRetrieves the maximum number of threads for the queue processorlongThe number of seconds a thread will remain alive even without work to do.Convert this configuration to a Properties
-
Field Details
-
MANDATORY_PROPERTIES
-
CONNECTION_PROPERTIES
-
configurationSource
private final com.suse.common.configuration.ConfigurationSource configurationSource
-
-
Constructor Details
-
DefaultConfiguration
public DefaultConfiguration()Default constructor -
DefaultConfiguration
protected DefaultConfiguration(com.suse.common.configuration.ConfigurationSource configSource)
-
-
Method Details
-
getDatabaseUser
Description copied from interface:ConfigurationRetrieve the database user- Specified by:
getDatabaseUserin interfaceConfiguration- Returns:
- the user to access the database
-
getDatabasePassword
Description copied from interface:ConfigurationRetrieves the database password- Specified by:
getDatabasePasswordin interfaceConfiguration- Returns:
- the unencrypted password to access the database
-
getDatabaseConnectionString
Description copied from interface:ConfigurationRetrieves the connection string- Specified by:
getDatabaseConnectionStringin interfaceConfiguration- Returns:
- the jdbc string to connect to the database
-
getDatabaseHostString
Description copied from interface:ConfigurationRetrieves the database hostname string- Specified by:
getDatabaseHostStringin interfaceConfiguration- Returns:
- the host string to use as part of the JDBC connection URL
-
getDatabasePort
public int getDatabasePort()Description copied from interface:ConfigurationRetrieves the database port integer- Specified by:
getDatabasePortin interfaceConfiguration- Returns:
- the port integern to use as part of the JDBC connection URL
-
getDatabaseNameString
Description copied from interface:ConfigurationRetrieves the database name string- Specified by:
getDatabaseNameStringin interfaceConfiguration- Returns:
- the postgresql database name string to use as part of the JDBC connection URL
-
getCorePoolSize
public int getCorePoolSize()Description copied from interface:ConfigurationRetrieves the number of core threads for the queue processor- Specified by:
getCorePoolSizein interfaceConfiguration- Returns:
- the number of core threads
-
getMaximumPoolSize
public int getMaximumPoolSize()Description copied from interface:ConfigurationRetrieves the maximum number of threads for the queue processor- Specified by:
getMaximumPoolSizein interfaceConfiguration- Returns:
- the maximum number of threads
-
getThreadKeepAliveInSeconds
public long getThreadKeepAliveInSeconds()Description copied from interface:ConfigurationThe number of seconds a thread will remain alive even without work to do.- Specified by:
getThreadKeepAliveInSecondsin interfaceConfiguration- Returns:
- the number of seconds a thread will be kept idle.
-
getBatchSize
public int getBatchSize()Description copied from interface:ConfigurationRetrieves the number of attestation results to process at a time.- Specified by:
getBatchSizein interfaceConfiguration- Returns:
- the maximum number of attestation results to process.
-
toProperties
Description copied from interface:ConfigurationConvert this configuration to a Properties- Specified by:
toPropertiesin interfaceConfiguration- Returns:
- a
Propertiesrepresenting the configuration.
-