public abstract class AbstractDBResourceBlocker extends AbstractResource implements DBResource
lock, multiResourcelock
Modifier | Constructor and Description |
---|---|
protected |
AbstractDBResourceBlocker(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 |
boolean |
isThis(ResourceParameters parameters)
Check if parameters is the same for this resource.
|
addConsumer, addObserver, addObservers, closeRequest, deleteObserver, deleteObservers, execute, executeBegins, executeEnds, getConsumerAt, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, getName, getParameters, inUse, isOpen, notifyChanges, notifyClose, notifyDispose, notifyObserver, notifyOpen, openCount, performExecution, prepare, prepare, removeConsumer, setData, updateLastTimeOpen, updateLastTimeUsed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isConnected
addConsumer, closeRequest, execute, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, getName, getParameters, inUse, isOpen, openCount, removeConsumer, setData
protected AbstractDBResourceBlocker(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 final void connect() throws DataException
DataException
public boolean isThis(ResourceParameters parameters) throws ResourceException
isThis
in interface ResourceProvider
ResourceException
ResourceProvider.isThis(ResourceParameters)
protected boolean equals(java.lang.Comparable v1, java.lang.Comparable v2)
protected abstract void connectToDB() throws DataException
DataException
protected abstract java.lang.Object getTheConnection() throws DataException
connect()
DataException