org.objectweb.cjdbc.controller.loadbalancer.tasks
Class BeginTask

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
      extended byorg.objectweb.cjdbc.controller.loadbalancer.tasks.BeginTask

public class BeginTask
extends AbstractTask

Task to begin a transaction. Note that this task does not properly set the transaction isolation but this is not a real issue since it is meant to be used by the recovery log that does not execute reads and provide its own serial order.

Version:
1.0
Author:
Emmanuel Cecchet , Julie Marguerite

Field Summary
private  java.lang.String login
          Login used by the connection.
private  long timeout
          Request timeout in milliseconds.
private  long transactionId
          Unique transaction identifier.
 
Fields inherited from class org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
 
Constructor Summary
BeginTask(int nbToComplete, int totalNb, long timeout, java.lang.String login, long transactionId)
          Begins a new transaction given a login and a transaction id.
 
Method Summary
 void executeTask(BackendWorkerThread backendThread)
          Begins a new transaction with the given backend thread.
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
execute, getExceptions, getExecutionStarted, getFailed, getGeneratedKeysResultSet, getNbToComplete, getSuccess, getTotalNb, hasCompleted, hasFullyCompleted, hasTid, notifyCompletion, notifyFailure, notifySuccess, setExpiredTimeout, setGeneratedKeysResultSet, setHasTid, setTotalNb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

login

private java.lang.String login
Login used by the connection.


transactionId

private long transactionId
Unique transaction identifier.


timeout

private long timeout
Request timeout in milliseconds.

Constructor Detail

BeginTask

public BeginTask(int nbToComplete,
                 int totalNb,
                 long timeout,
                 java.lang.String login,
                 long transactionId)
Begins a new transaction given a login and a transaction id.

Parameters:
nbToComplete - number of threads that must succeed before returning
totalNb - total number of threads
timeout - request timeout in milliseconds
login - the login used by the connection
transactionId - a unique transaction identifier
Method Detail

executeTask

public void executeTask(BackendWorkerThread backendThread)
                 throws java.sql.SQLException
Begins a new transaction with the given backend thread.

Specified by:
executeTask in class AbstractTask
Parameters:
backendThread - the backend thread that will execute the task
Throws:
java.sql.SQLException - if an error occurs

toString

public java.lang.String toString()
See Also:
Object.toString()


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