|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.security.voms.database.connection.ConnectionWrapper | +--org.edg.security.voms.database.connection.ClientConnection | +--org.edg.security.voms.database.connection.Update
A subclass of ConnectionWrapper for updates with convenient transaction management.
Field Summary | |
private static long |
lastRealtimeTimestamp
The last time we created a transaction timestamp. |
private static long |
lastRealtimeTransaction
The last transaction id that has a timestamp. |
private static org.apache.log4j.Logger |
log
Logger. |
private static Sequence |
seq
The sequence object for accessing the database-wide transaction id. |
private long |
transaction
Current transaction id. |
Fields inherited from class org.edg.security.voms.database.connection.ClientConnection |
|
Fields inherited from class org.edg.security.voms.database.connection.ConnectionWrapper |
conn, id, inTransaction, pool, stmts |
Constructor Summary | |
Update(java.sql.Connection conn,
ConnectionPool pool,
int id)
Creates a new Update. |
Method Summary | |
static Update |
begin()
Allocates an Update from the connection pool, and starts a transaction on it. |
(package private) void |
beginTransaction()
Starts a new transaction. |
void |
commit()
Commit the current transaction, and release this connection. |
long |
getTransaction()
Returns the transaction value. |
boolean |
isInTransaction(long id)
Return true if the wrapper is still in the specified transaction. |
boolean |
isReadonly()
|
void |
rollback()
Roll back the current transaction, and release this connection. |
static void |
writeTransactionTimestamp()
Unconditionally write out a timestamp record with the current transaction number. |
void |
writeTransactionTimestampIfNecessary()
Write a new timestamp record for the last transaction if necessary. |
Methods inherited from class org.edg.security.voms.database.connection.ClientConnection |
endTransaction, getClient, getClientId |
Methods inherited from class org.edg.security.voms.database.connection.ConnectionWrapper |
close, getConnection, getStatement, isClosed, isDirty, isFunctional, isInTransaction, setDirty, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Sequence seq
private long transaction
private static org.apache.log4j.Logger log
private static long lastRealtimeTimestamp
private static long lastRealtimeTransaction
Constructor Detail |
public Update(java.sql.Connection conn, ConnectionPool pool, int id)
Method Detail |
public static Update begin() throws VOMSException
VOMSException
void beginTransaction() throws VOMSException
beginTransaction
in class ClientConnection
VOMSException
public void commit() throws GeneralDatabaseException
GeneralDatabaseException
public void rollback()
public boolean isInTransaction(long id)
public long getTransaction()
transaction
value.
public static void writeTransactionTimestamp()
public void writeTransactionTimestampIfNecessary()
public boolean isReadonly()
isReadonly
in class ClientConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |