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(AbstractDBResourceParameters parameters)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
Establish connection to data base
|
protected abstract void |
connectToDB()
|
protected boolean |
equals(java.lang.Comparable v1,
java.lang.Comparable v2) |
java.lang.Object |
get()
Return a connection to the data base.
|
java.lang.Object |
getConnection()
Return a connection to the data base.
|
protected abstract java.lang.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(AbstractDBResourceParameters parameters) throws InitializeException
parameters
- InitializeException
public java.lang.Object get() throws AccessResourceException
get
in interface Resource
get
in class AbstractResource
AccessResourceException
- if there is an error while accessing the resourcepublic java.lang.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 java.lang.Object getTheConnection() throws DataException
connect()
DataException
public boolean isThis(ResourceParameters parameters) throws ResourceException
ResourceException
AbstractResource#isThis(ResourceParameters)
protected boolean equals(java.lang.Comparable v1, java.lang.Comparable v2)