Package lu.kbra.pclib.db.connector
Class SingleDataBaseConnector
java.lang.Object
lu.kbra.pclib.db.connector.AbstractDataBaseConnector
lu.kbra.pclib.db.connector.SingleDataBaseConnector
- All Implemented Interfaces:
Cloneable,DataBaseConnector
- Direct Known Subclasses:
SQLiteDataBaseConnector
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classNested classes/interfaces inherited from class lu.kbra.pclib.db.connector.AbstractDataBaseConnector
AbstractDataBaseConnector.CachedConnection, AbstractDataBaseConnector.ConnectionCachingStrategy -
Field Summary
Fields inherited from class lu.kbra.pclib.db.connector.AbstractDataBaseConnector
generation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Connectionconnect()protected final AbstractDataBaseConnector.ConnectionCachingStrategybooleankeepAlive(int timeoutSeconds) final voidreset()use()Methods inherited from class lu.kbra.pclib.db.connector.AbstractDataBaseConnector
cloneMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface lu.kbra.pclib.db.connector.impl.DataBaseConnector
createConnection, getDatabase, getProtocol, getURI, preDelete, setDatabase
-
Constructor Details
-
SingleDataBaseConnector
public SingleDataBaseConnector()
-
-
Method Details
-
connect
- Throws:
DBException
-
keepAlive
public boolean keepAlive(int timeoutSeconds) - Returns:
- false if the connection was still alive or isn't created.
true if the connection needed to be reset
-
reset
- Throws:
DBException
-
use
- Throws:
DBException
-
getConnectionCachingStrategy
- Overrides:
getConnectionCachingStrategyin classAbstractDataBaseConnector
-