org.objectweb.cjdbc.controller.scheduler.singledb
Class SingleDBQueryLevelScheduler

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.scheduler.AbstractScheduler
      extended byorg.objectweb.cjdbc.controller.scheduler.singledb.SingleDBQueryLevelScheduler
All Implemented Interfaces:
XmlComponent

public class SingleDBQueryLevelScheduler
extends AbstractScheduler

This scheduler provides scheduling for a single backend instance. It is really trivial and does not yet support distribution.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
private  long requestId
           
 
Fields inherited from class org.objectweb.cjdbc.controller.scheduler.AbstractScheduler
logger, parsingGranularity, raidbLevel
 
Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent
DOCTYPE_DB, XML_VERSION
 
Constructor Summary
SingleDBQueryLevelScheduler()
          Creates a new Single Database Scheduler
 
Method Summary
protected  void commitTransaction(long transactionId)
          Commit a transaction given its id.
 java.lang.String getXmlImpl()
           
 void notifyWriteCompleted(AbstractWriteRequest request)
          Notify the completion of a write statement.
 void readCompletedNotify(SelectRequest request)
          Notify the completion of a read statement.
protected  void rollbackTransaction(long transactionId)
          Rollback a transaction given its id.
 void scheduleNonSuspendedWriteRequest(AbstractWriteRequest request)
          Schedule a write request (implementation specific).
 void scheduleReadRequest(SelectRequest request)
          Schedule a read request (implementation specific).
 
Methods inherited from class org.objectweb.cjdbc.controller.scheduler.AbstractScheduler
begin, beginCompleted, commit, commitCompleted, getNumberRead, getNumberWrite, getParsingGranularity, getPendingTransactions, getPendingWrites, getRAIDbLevel, getSchedulerData, getXml, hasSQLMacros, initializeTransactionId, isSuspendedTransactions, isSuspendedWrites, mergeDatabaseSchema, readCompleted, resumeNewTransactions, resumeWrites, rollback, rollbackCompleted, 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

requestId

private long requestId
Constructor Detail

SingleDBQueryLevelScheduler

public SingleDBQueryLevelScheduler()
Creates a new Single Database Scheduler

Method Detail

scheduleReadRequest

public final void scheduleReadRequest(SelectRequest request)
Description copied from class: AbstractScheduler
Schedule a read request (implementation specific). This method blocks until the read can be executed.

Specified by:
scheduleReadRequest in class AbstractScheduler
Parameters:
request - Select request to schedule (SQL macros are already handled if needed)
See Also:
AbstractScheduler.scheduleReadRequest(SelectRequest)

readCompletedNotify

public final void readCompletedNotify(SelectRequest request)
Description copied from class: AbstractScheduler
Notify the completion of a read statement.

Specified by:
readCompletedNotify in class AbstractScheduler
Parameters:
request - the completed request
See Also:
AbstractScheduler.readCompletedNotify(SelectRequest)

scheduleNonSuspendedWriteRequest

public final void scheduleNonSuspendedWriteRequest(AbstractWriteRequest request)
Description copied from class: AbstractScheduler
Schedule a write request (implementation specific). This method blocks until the request can be executed.

Specified by:
scheduleNonSuspendedWriteRequest in class AbstractScheduler
Parameters:
request - Write request to schedule (SQL macros are already handled if needed)
See Also:
AbstractScheduler.scheduleWriteRequest(AbstractWriteRequest)

notifyWriteCompleted

public final void notifyWriteCompleted(AbstractWriteRequest request)
Description copied from class: AbstractScheduler
Notify the completion of a write statement. This method does not need to be synchronized, it is enforced by the caller.

Specified by:
notifyWriteCompleted in class AbstractScheduler
Parameters:
request - the completed request
See Also:
AbstractScheduler.notifyWriteCompleted(AbstractWriteRequest)

commitTransaction

protected final void commitTransaction(long transactionId)
Description copied from class: AbstractScheduler
Commit a transaction given its id.

Specified by:
commitTransaction in class AbstractScheduler
Parameters:
transactionId - the transaction id
See Also:
AbstractScheduler.commitTransaction(long)

rollbackTransaction

protected final void rollbackTransaction(long transactionId)
Description copied from class: AbstractScheduler
Rollback a transaction given its id.

Specified by:
rollbackTransaction in class AbstractScheduler
Parameters:
transactionId - the transaction id
See Also:
AbstractScheduler.rollbackTransaction(long)

getXmlImpl

public java.lang.String getXmlImpl()
Specified by:
getXmlImpl in class AbstractScheduler
See Also:
AbstractScheduler.getXmlImpl()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.