Public Member Functions | |
RAIDb0PessimisticTransactionLevelScheduler () | |
final 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) |
Definition at line 46 of file RAIDb0PessimisticTransactionLevelScheduler.java.
|
Creates a new Pessimistic Transaction Level Scheduler Definition at line 71 of file RAIDb0PessimisticTransactionLevelScheduler.java. 00072 { 00073 super(RAIDbLevels.RAIDb0, ParsingGranularities.NO_PARSING); 00074 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 161 of file RAIDb0PessimisticTransactionLevelScheduler.java. 00162 { 00163 releaseLock(transactionId); 00164 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 208 of file RAIDb0PessimisticTransactionLevelScheduler.java. 00209 { 00210 StringBuffer info = new StringBuffer(); 00211 info.append("<" + DatabasesXmlTags.ELT_RAIDb0Scheduler + " " 00212 + DatabasesXmlTags.ATT_level + "=\"" 00213 + DatabasesXmlTags.VAL_pessimisticTransaction + "\"/>"); 00214 return info.toString(); 00215 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 145 of file RAIDb0PessimisticTransactionLevelScheduler.java. References org.objectweb.cjdbc.common.sql.AbstractRequest.getTransactionId(), org.objectweb.cjdbc.common.sql.AbstractRequest.isAutoCommit, and org.objectweb.cjdbc.common.sql.AbstractWriteRequest.isCreate(). 00147 { 00148 // Requests outside transaction delimiters must release the lock 00149 // as soon as they have executed 00150 if (request.isAutoCommit() && (!request.isCreate())) 00151 releaseLock(request.getTransactionId()); 00152 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 98 of file RAIDb0PessimisticTransactionLevelScheduler.java. 00099 { 00100 }
|
|
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 169 of file RAIDb0PessimisticTransactionLevelScheduler.java. 00170 { 00171 releaseLock(transactionId); 00172 }
|
|
Additionally to scheduling the request, this method replaces the SQL Date macros such as now() with the current date. Note that CREATE statements are not synchronized.
Implements org.objectweb.cjdbc.controller.scheduler.AbstractScheduler. Definition at line 109 of file RAIDb0PessimisticTransactionLevelScheduler.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(). 00111 { 00112 if (request.isCreate()) 00113 { 00114 synchronized (this) 00115 { 00116 request.setId(requestId++); 00117 } 00118 return; 00119 } 00120 00121 if (lock.acquire(request)) 00122 { 00123 synchronized (this) 00124 { 00125 request.setId(requestId++); 00126 } 00127 if (logger.isDebugEnabled()) 00128 logger.debug("Request " + request.getId() + " scheduled for write (" 00129 + getPendingWrites() + " pending writes)"); 00130 } 00131 else 00132 { 00133 if (logger.isWarnEnabled()) 00134 logger.warn("Request " + request.getId() + " timed out (" 00135 + request.getTimeout() + " s)"); 00136 throw new SQLException("Timeout (" + request.getTimeout() 00137 + ") for request: " 00138 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 00139 } 00140 }
|
|
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 86 of file RAIDb0PessimisticTransactionLevelScheduler.java. 00088 { 00089 synchronized (this) 00090 { 00091 request.setId(requestId++); 00092 } 00093 }
|