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

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

public class KillThreadTask
extends AbstractTask

This task is used to kill backend worker threads.

Version:
1.0
Author:
Emmanuel Cecchet, Julie Marguerite

Field Summary
 
Fields inherited from class org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
 
Constructor Summary
KillThreadTask(int nbToComplete, int totalNb)
          Creates a new KillThreadTask instance that must be executed by nbToComplete backend threads
 
Method Summary
 void executeTask(BackendWorkerThread backendThread)
          This function call the backendThread kill function and notifies the task completion success.
 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
 

Constructor Detail

KillThreadTask

public KillThreadTask(int nbToComplete,
                      int totalNb)
Creates a new KillThreadTask instance that must be executed by nbToComplete backend threads

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

executeTask

public void executeTask(BackendWorkerThread backendThread)
                 throws java.sql.SQLException
This function call the backendThread kill function and notifies the task completion success.

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.