public abstract class AbstractDBResourceNoBlocker extends AbstractNonBlockingResource
Abstract Data Base Resource implementation that allow the concurrent access.
Useful for Pooled Data Base Access.
lock, multiResourcelock
Modifier | Constructor and Description |
---|---|
protected |
AbstractDBResourceNoBlocker(DBResourceParameters parameters)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
Establish connection to data base
|
protected abstract void |
connectToDB()
|
protected boolean |
equals(Comparable v1,
Comparable v2) |
Object |
get()
Return a connection to the data base.
|
Object |
getConnection()
Return a connection to the data base.
|
protected abstract Object |
getTheConnection()
final implementation method to get a connection to data base
Called from connect() This method is called with the connection establish |
abstract boolean |
isConnected()
inform if connection to the data base is established
|
boolean |
isThis(ResourceParameters parameters)
Check if parameters is the same for this resource.
|
execute
addConsumer, addObserver, addObservers, closeRequest, deleteObserver, deleteObservers, executeBegins, executeEnds, getConsumerAt, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, getName, getParameters, inUse, isOpen, notifyChanges, notifyClose, notifyDispose, notifyObserver, notifyOpen, openCount, performExecution, prepare, prepare, removeConsumer, setData, updateLastTimeOpen, updateLastTimeUsed
protected AbstractDBResourceNoBlocker(DBResourceParameters parameters) throws InitializeException
parameters
- InitializeException
public Object get() throws AccessResourceException
get
in interface Resource
get
in class AbstractResource
AccessResourceException
- if there is an error while accessing the resourcepublic Object getConnection() throws AccessResourceException
AccessResourceException
get()
public abstract boolean isConnected()
public final void connect() throws DataException
DataException
protected abstract void connectToDB() throws DataException
DataException
protected abstract Object getTheConnection() throws DataException
connect()
DataException
public boolean isThis(ResourceParameters parameters) throws ResourceException
ResourceException
AbstractResource#isThis(ResourceParameters)
protected boolean equals(Comparable v1, Comparable v2)