DataBridge Documentation 2.0.17
A Java library for managing database connections and transactions
Loading...
Searching...
No Matches
io.github.kdesp73.databridge.helpers.Config Class Reference

Public Member Functions

boolean getBoolean (String key)
 
String getDbPassword ()
 
boolean getDbRetry ()
 
int getDbRetryDelay ()
 
int getDbRetryTimes ()
 
String getDbUrl ()
 
String getDbUser ()
 
int getInt (String key)
 
String getLogFile ()
 
LogLevel getLogLevel ()
 
String getString (String key)
 
void printConfig ()
 
void saveConfig ()
 
void setProperty (String key, String value)
 

Static Public Member Functions

static void generate ()
 
static Config getInstance ()
 

Detailed Description

The Config class is a singleton utility class that loads and saves application configuration from and to a properties file located in src/resources.

Member Function Documentation

◆ getInstance()

static Config io.github.kdesp73.databridge.helpers.Config.getInstance ( )
static

Gets the singleton instance of the Config class.

Returns
The singleton instance of the Config class.

◆ saveConfig()

void io.github.kdesp73.databridge.helpers.Config.saveConfig ( )

Saves the current configuration properties back to the config.properties file.

◆ generate()

static void io.github.kdesp73.databridge.helpers.Config.generate ( )
static

Generates a default configuration file in the src/main/resources directory.

◆ getLogLevel()

LogLevel io.github.kdesp73.databridge.helpers.Config.getLogLevel ( )

Gets the log level from the configuration

Returns
The log level

◆ getLogFile()

String io.github.kdesp73.databridge.helpers.Config.getLogFile ( )

Gets log file from the configuration.

Returns
The log file

◆ getDbUrl()

String io.github.kdesp73.databridge.helpers.Config.getDbUrl ( )

Gets the database URL from the configuration.

Returns
The database URL.

◆ getDbUser()

String io.github.kdesp73.databridge.helpers.Config.getDbUser ( )

Gets the database user from the configuration.

Returns
The database user.

◆ getDbPassword()

String io.github.kdesp73.databridge.helpers.Config.getDbPassword ( )

Gets the database password from the configuration.

Returns
The database password.

◆ getDbRetry()

boolean io.github.kdesp73.databridge.helpers.Config.getDbRetry ( )

Gets the database retry setting from the configuration.

Returns
true if retries are enabled, otherwise false.

◆ getDbRetryTimes()

int io.github.kdesp73.databridge.helpers.Config.getDbRetryTimes ( )

Gets the number of retry attempts for the database connection.

Returns
The number of retry attempts.

◆ getDbRetryDelay()

int io.github.kdesp73.databridge.helpers.Config.getDbRetryDelay ( )

Gets the delay between retry attempts for the database connection.

Returns
The delay between retry attempts in milliseconds.

The documentation for this class was generated from the following file: