Public Member Functions | |
SingleDBPessimisticTransactionLevelScheduler () | |
final synchronized void | scheduleReadRequest (SelectRequest request) throws SQLException |
final void | readCompletedNotify (SelectRequest request) |
void | scheduleNonSuspendedWriteRequest (AbstractWriteRequest request) throws SQLException |
final synchronized void | notifyWriteCompleted (AbstractWriteRequest request) |
String | getXmlImpl () |
Protected Member Functions | |
final void | commitTransaction (long transactionId) |
final void | rollbackTransaction (long transactionId) |
Package Attributes | |
TransactionExclusiveLock | lock = new TransactionExclusiveLock() |
Definition at line 45 of file SingleDBPessimisticTransactionLevelScheduler.java.
|
Creates a new Pessimistic Transaction Level Scheduler Definition at line 70 of file SingleDBPessimisticTransactionLevelScheduler.java. 00071 { 00072 super(RAIDbLevels.SingleDB, ParsingGranularities.NO_PARSING); 00073 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 146 of file SingleDBPessimisticTransactionLevelScheduler.java. 00147 { 00148 releaseLock(transactionId); 00149 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 193 of file SingleDBPessimisticTransactionLevelScheduler.java. 00194 { 00195 return "<" + DatabasesXmlTags.ELT_SingleDBScheduler + " " 00196 + DatabasesXmlTags.ATT_level + "=\"" 00197 + DatabasesXmlTags.VAL_pessimisticTransaction + "\"/>"; 00198 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 130 of file SingleDBPessimisticTransactionLevelScheduler.java. References org.objectweb.cjdbc.common.sql.AbstractRequest.getTransactionId(), and org.objectweb.cjdbc.common.sql.AbstractRequest.isAutoCommit. 00132 { 00133 // Requests outside transaction delimiters must release the lock 00134 // as soon as they have executed 00135 if (request.isAutoCommit()) 00136 releaseLock(request.getTransactionId()); 00137 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 94 of file SingleDBPessimisticTransactionLevelScheduler.java. 00095 { 00096 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 154 of file SingleDBPessimisticTransactionLevelScheduler.java. 00155 { 00156 releaseLock(transactionId); 00157 }
|
|
Additionally to scheduling the request, this method replaces the SQL Date macros such as now() with the current date.
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 104 of file SingleDBPessimisticTransactionLevelScheduler.java. References org.objectweb.cjdbc.common.log.Trace.debug(), org.objectweb.cjdbc.controller.scheduler.AbstractScheduler.getPendingWrites(), org.objectweb.cjdbc.common.log.Trace.isDebugEnabled(), org.objectweb.cjdbc.common.log.Trace.isWarnEnabled(), and org.objectweb.cjdbc.common.log.Trace.warn(). 00106 { 00107 if (lock.acquire(request)) 00108 { 00109 synchronized (this) 00110 { 00111 request.setId(requestId++); 00112 } 00113 if (logger.isDebugEnabled()) 00114 logger.debug("Request " + request.getId() + " scheduled for write (" 00115 + getPendingWrites() + " pending writes)"); 00116 } 00117 else 00118 { 00119 if (logger.isWarnEnabled()) 00120 logger.warn("Request " + request.getId() + " timed out (" 00121 + request.getTimeout() + " s)"); 00122 throw new SQLException("Timeout (" + request.getTimeout() 00123 + ") for request: " + request.getId()); 00124 } 00125 }
|
|
Additionally to scheduling the request, this method replaces the SQL Date macros such as now() with the current date.
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 85 of file SingleDBPessimisticTransactionLevelScheduler.java. 00087 { 00088 request.setId(requestId++); 00089 }
|