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

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

public class SavepointTask
extends AbstractTask

Task to set a savepoint to a transaction.

Version:
1.0
Author:
Jean-Bernard van Zuylen

Field Summary
private  java.lang.String login
          Login used by the connection.
private  java.sql.Savepoint result
          Savepoint that was created.
private  java.lang.String savepointName
          Name of the savepoint.
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
SavepointTask(int nbToComplete, int totalNb, long timeout, java.lang.String login, long transactionId, java.lang.String savepointName)
          Sets a savepoint given a login, a transaction id and a name.
 
Method Summary
 void executeTask(BackendWorkerThread backendThread)
          The implementation specific task code to be executed by backendThread.
 java.sql.Savepoint getResult()
          Returns the result.
 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.


savepointName

private java.lang.String savepointName
Name of the savepoint.


result

private java.sql.Savepoint result
Savepoint that was created.

Constructor Detail

SavepointTask

public SavepointTask(int nbToComplete,
                     int totalNb,
                     long timeout,
                     java.lang.String login,
                     long transactionId,
                     java.lang.String savepointName)
Sets a savepoint given a login, a transaction id and a name.

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

executeTask

public void executeTask(BackendWorkerThread backendThread)
                 throws java.sql.SQLException
Description copied from class: AbstractTask
The implementation specific task code to be executed by backendThread.

Specified by:
executeTask in class AbstractTask
Parameters:
backendThread - The backend thread executing this task
Throws:
java.sql.SQLException - if an error occurs
See Also:
AbstractTask.executeTask(org.objectweb.cjdbc.controller.loadbalancer.BackendWorkerThread)

getResult

public java.sql.Savepoint getResult()
Returns the result.

Returns:
Savepoint

toString

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


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