org.objectweb.cjdbc.controller.loadbalancer.tasks
Class WriteRequestWithKeysTask
java.lang.Object
org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask
org.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 , Jaco Swart
Fields inherited from class org.objectweb.cjdbc.controller.loadbalancer.tasks.AbstractTask |
|
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 |
request
private AbstractWriteRequest request
result
private ControllerResultSet result
metadataCache
private MetadataCache metadataCache
WriteRequestWithKeysTask
public WriteRequestWithKeysTask(int nbToComplete,
int totalNb,
AbstractWriteRequest request,
MetadataCache metadataCache)
- Creates a new
WriteRequestTask
.
- Parameters:
nbToComplete
- number of threads that must succeed before returningtotalNb
- total number of threadsrequest
- an AbstractWriteRequest
metadataCache
- the metadataCache if any or null
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 ControllerResultSet getResult()
- Returns the auto generated keys.
- Returns:
- ResultSet
toString
public java.lang.String toString()
- See Also:
Object.toString()
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.