Definition at line 22 of file Database.java.
org.openslx.imagemaster.db.Database.[static initializer] |
( |
| ) |
|
|
staticpackage |
Static initializer for setting up the database connection.
This gets called implicitly as soon as the class loader loads the class. In most cases that happens when the class is being accessed for the first time during run time.
static MysqlConnection org.openslx.imagemaster.db.Database.getConnection |
( |
| ) |
|
|
static |
Get a connection to the database.
If there is a valid connection in the pool, it will be returned. Otherwise, a new connection is created. If there are more than 20 busy connections, null
is returned.
- Returns
- connection to database, or
null
Definition at line 92 of file Database.java.
static boolean org.openslx.imagemaster.db.Database.isDuplicateKeyException |
( |
SQLException |
e | ) |
|
|
static |
static void org.openslx.imagemaster.db.Database.printCharsetInformation |
( |
| ) |
|
|
static |
static void org.openslx.imagemaster.db.Database.printDebug |
( |
| ) |
|
|
static |
static void org.openslx.imagemaster.db.Database.returnConnection |
( |
MysqlConnection |
connection | ) |
|
|
staticpackage |
Called by a MysqlConnection when its close()
-method is called, so the connection will be added to the pool of available connections again.
- Parameters
-
Definition at line 147 of file Database.java.
final Set<MysqlConnection> org.openslx.imagemaster.db.Database.busyConnections = Collections.newSetFromMap( new ConcurrentHashMap<MysqlConnection, Boolean>() ) |
|
staticprivate |
Set of connections currently handed out.
Definition at line 34 of file Database.java.
final String org.openslx.imagemaster.db.Database.dbname |
|
staticprivate |
final String org.openslx.imagemaster.db.Database.host |
|
staticprivate |
final Logger org.openslx.imagemaster.db.Database.LOGGER = LogManager.getLogger( Database.class ) |
|
staticprivate |
final String org.openslx.imagemaster.db.Database.password |
|
staticprivate |
final Queue<MysqlConnection> org.openslx.imagemaster.db.Database.pool = new ConcurrentLinkedQueue<>() |
|
staticprivate |
Pool of available connections.
Definition at line 29 of file Database.java.
final String org.openslx.imagemaster.db.Database.user |
|
staticprivate |
The documentation for this class was generated from the following file: