public abstract class AbstractDBResourceBlocker extends AbstractResource implements DBResource
lock, multiResourcelock
Modifier | Constructor and Description |
---|---|
protected |
AbstractDBResourceBlocker(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 |
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(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 final void connect() throws DataException
DataException
public boolean isThis(ResourceParameters parameters) throws ResourceException
isThis
in interface ResourceProvider
ResourceException
ResourceProvider.isThis(ResourceParameters)
protected boolean equals(Comparable v1, Comparable v2)
protected abstract void connectToDB() throws DataException
DataException
protected abstract Object getTheConnection() throws DataException
connect()
DataException