Interface ConnectionFactory
-
- All Known Implementing Classes:
H2ConnectionFactory,HikariConfiguration,MariaDBConnectionFactory,MySQLConnectionFactory,PostgreSQLConnectionFactory,SQLiteConnectionFactory
public interface ConnectionFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.jdbi.v3.core.JdbigetJdbi()Get the instance of JDBIStringgetTablePrefix()Get the table prefixStorageTypegetType()Get the storage type of the connection factoryvoidinit()Initialize connection factorybooleanisFailed()Is the connection factory failed to start?voidsetDatabaseUrl(String databaseUrl)Set the database url of the connection factoryvoidstop()Stop the connection factory
-
-
-
Method Detail
-
init
void init()
Initialize connection factory
-
stop
void stop()
Stop the connection factory
-
isFailed
boolean isFailed()
Is the connection factory failed to start?- Returns:
- true if the initialization has failed
-
getJdbi
org.jdbi.v3.core.Jdbi getJdbi()
Get the instance of JDBI- Returns:
- the JDBI instance, null before initialization
-
getType
StorageType getType()
Get the storage type of the connection factory- Returns:
- the storage type
-
getTablePrefix
String getTablePrefix()
Get the table prefix- Returns:
- the table prefix
-
setDatabaseUrl
void setDatabaseUrl(String databaseUrl)
Set the database url of the connection factory- Parameters:
databaseUrl- the database url to set
-
-