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

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

public class WriteRequestWithKeysTask
extends AbstractTask

Executes a AbstractWriteRequest statement and return the auto generated keys.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
private  AbstractWriteRequest request
           
private  java.sql.ResultSet result
           
 
Fields inherited from class org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
 
Constructor Summary
WriteRequestWithKeysTask(int nbToComplete, int totalNb, AbstractWriteRequest request)
          Creates a new WriteRequestTask.
 
Method Summary
 void execute(BackendWorkerThread backendThread)
          Executes a write request with the given backend thread.
 java.sql.ResultSet getResult()
          Returns the auto generated keys.
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
getExceptions, getFailed, getNbToComplete, getSuccess, getTotalNb, notifyFailure, notifySuccess, setTotalNb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

request

private AbstractWriteRequest request

result

private java.sql.ResultSet result
Constructor Detail

WriteRequestWithKeysTask

public WriteRequestWithKeysTask(int nbToComplete,
                                int totalNb,
                                AbstractWriteRequest request)
Creates a new WriteRequestTask.

Parameters:
nbToComplete - number of threads that must succeed before returning
totalNb - total number of threads
request - an AbstractWriteRequest
Method Detail

execute

public void execute(BackendWorkerThread backendThread)
             throws java.sql.SQLException
Executes a write request with the given backend thread.

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

getResult

public java.sql.ResultSet getResult()
Returns the auto generated keys.

Returns:
ResultSet

toString

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


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