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

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

public class WriteStoredProcedureTask
extends AbstractTask

Executes a write StoredProcedure call.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
private  StoredProcedure proc
           
private  int result
           
 
Fields inherited from class org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
 
Constructor Summary
WriteStoredProcedureTask(int nbToComplete, int totalNb, StoredProcedure proc)
          Creates a new WriteStoredProcedureTask.
 
Method Summary
 void executeTask(BackendWorkerThread backendThread)
          Executes a write request with the given backend thread.
 int 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

proc

private StoredProcedure proc

result

private int result
Constructor Detail

WriteStoredProcedureTask

public WriteStoredProcedureTask(int nbToComplete,
                                int totalNb,
                                StoredProcedure proc)
Creates a new WriteStoredProcedureTask.

Parameters:
nbToComplete - number of threads that must succeed before returning
totalNb - total number of threads
proc - the StoredProcedure to call
Method Detail

executeTask

public void executeTask(BackendWorkerThread backendThread)
                 throws java.sql.SQLException
Executes a write request 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

getResult

public int getResult()
Returns the result.

Returns:
int

toString

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


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