|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.db.OntimizeConnection
Modified 10-07-2002. Add 'reserved' state
| Field Summary | |
protected java.sql.Connection |
connection
|
static boolean |
DEBUG
|
protected long |
lastUsedHour
|
protected boolean |
lock
|
protected int |
reservationId
|
protected boolean |
reserved
|
protected long |
reserveRequestTime
|
| Constructor Summary | |
OntimizeConnection(java.sql.Connection con)
Creates a new OntimizeConnection instance with the specified database connection |
|
OntimizeConnection(java.lang.String driver,
java.lang.String dbURL,
java.lang.String user,
java.lang.String password)
Creates a new OntimizeConnection instance using the specified database parameters |
|
| Method Summary | |
void |
cancelReservation()
|
void |
close()
Close the database connection |
java.sql.Connection |
getConnection()
Get the database connection |
java.lang.String |
getConnectionLockStack()
|
java.lang.String |
getCurrentLockKey()
|
long |
getLastUseTime()
Gets the last time when this connection has been used |
long |
getReservationElapsedTime()
|
int |
getReservationId()
|
boolean |
isLocked()
Is true if this connection is locked |
boolean |
isReserved()
|
boolean |
reserve(int reserveId)
Reserver this OntimizeConnection |
void |
setLastUseTime(long time)
Sets the time value for the last connection use parameter |
void |
setLock(boolean lock)
Sets the lock parameter value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean DEBUG
protected java.sql.Connection connection
protected boolean lock
protected long lastUsedHour
protected boolean reserved
protected int reservationId
protected long reserveRequestTime
| Constructor Detail |
public OntimizeConnection(java.lang.String driver,
java.lang.String dbURL,
java.lang.String user,
java.lang.String password)
throws java.lang.Exception
driver - Database driverdbURL - Database urluser - Database userpassword - Database password
java.lang.Exception
public OntimizeConnection(java.sql.Connection con)
throws java.lang.Exception
con -
java.lang.Exception| Method Detail |
public long getLastUseTime()
public boolean isLocked()
public void setLastUseTime(long time)
time - time to setpublic java.lang.String getConnectionLockStack()
public void setLock(boolean lock)
lock - public java.lang.String getCurrentLockKey()
public boolean reserve(int reserveId)
reserveId -
public long getReservationElapsedTime()
public boolean isReserved()
public void cancelReservation()
public int getReservationId()
public java.sql.Connection getConnection()
public void close()
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||