|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.controller.scheduler.AbstractScheduler
org.objectweb.cjdbc.controller.scheduler.raidb2.RAIDb2QueryLevelScheduler
This scheduler provides query level scheduling for RAIDb-2 controllers. Reads can execute in parallel until a write comes in. Then the write waits for the completion of the reads. Any new read is stacked after the write and they are released together when the write has completed its execution.
| Field Summary | |
private java.lang.String |
groupName
|
private int |
pendingReads
|
private java.lang.Object |
readSync
|
private int |
requestId
|
private java.lang.Object |
writeSync
|
| Fields inherited from class org.objectweb.cjdbc.controller.scheduler.AbstractScheduler |
logger, needSQLMacroHandling, parsingGranularity, raidbLevel |
| Constructor Summary | |
RAIDb2QueryLevelScheduler()
Creates a new Query Level Scheduler |
|
| Method Summary | |
protected void |
commitTransaction(int transactionId)
Commit a transaction given its id. |
java.lang.String |
getInformation()
Get information about the Request Scheduler |
java.lang.String |
getXmlInformation()
Get information about the Request Scheduler in xml format |
void |
notifyWriteCompleted(AbstractWriteRequest request)
Notify the completion of a write statement. |
void |
readCompleted(SelectRequest request)
Notify the completion of a read statement. |
protected void |
rollbackTransaction(int transactionId)
Rollback a transaction given its id. |
void |
scheduleNonSuspendedWriteRequest(AbstractWriteRequest request)
Additionally to scheduling the request, this method replaces the SQL Date macros such as now() with the current date. |
void |
scheduleReadRequest(SelectRequest request)
Additionally to scheduling the request, this method replaces the SQL Date macros such as now() with the current date. |
| Methods inherited from class org.objectweb.cjdbc.controller.scheduler.AbstractScheduler |
begin, beginCompleted, commit, commitCompleted, getParsingGranularity, getPendingWrites, getRAIDbLevel, handleSQLMacros, hasSQLMacros, mergeDatabaseSchema, resumeNewTransactions, resumeWrites, rollback, rollbackCompleted, scheduleReadRequest, scheduleWriteRequest, setDatabaseSchema, setParsingGranularity, setRAIDbLevel, suspendNewTransactionsForCheckpoint, suspendWrites, writeCompleted |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int requestId
private java.lang.String groupName
private int pendingReads
private java.lang.Object readSync
private java.lang.Object writeSync
| Constructor Detail |
public RAIDb2QueryLevelScheduler()
| Method Detail |
public void scheduleReadRequest(SelectRequest request)
throws java.sql.SQLException
scheduleReadRequest in class AbstractSchedulerrequest - Select request to schedule (SQL macros are already handled if needed)
java.sql.SQLException - if a timeout occursAbstractScheduler.scheduleReadRequest(SelectRequest)public final void readCompleted(SelectRequest request)
AbstractScheduler
readCompleted in class AbstractSchedulerrequest - the completed requestAbstractScheduler.readCompleted(SelectRequest)
public void scheduleNonSuspendedWriteRequest(AbstractWriteRequest request)
throws java.sql.SQLException
scheduleNonSuspendedWriteRequest in class AbstractSchedulerrequest - Write request to schedule (SQL macros are already handled if needed)
java.sql.SQLException - if a timeout occursAbstractScheduler.scheduleWriteRequest(AbstractWriteRequest)public final void notifyWriteCompleted(AbstractWriteRequest request)
AbstractScheduler
notifyWriteCompleted in class AbstractSchedulerrequest - the completed requestAbstractScheduler.notifyWriteCompleted(AbstractWriteRequest)protected final void commitTransaction(int transactionId)
AbstractScheduler
commitTransaction in class AbstractSchedulertransactionId - the transaction idAbstractScheduler.commitTransaction(int)protected final void rollbackTransaction(int transactionId)
AbstractScheduler
rollbackTransaction in class AbstractSchedulertransactionId - the transaction idAbstractScheduler.rollbackTransaction(int)public java.lang.String getInformation()
AbstractScheduler
getInformation in class AbstractSchedulerString containing informationAbstractScheduler.getInformation()public java.lang.String getXmlInformation()
AbstractScheduler
getXmlInformation in class AbstractSchedulerString containing information in xmlAbstractScheduler.getXmlInformation()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||