com.massimo.tools.scriptrunner.work
Class ThreadedSQLTask
java.lang.Object
com.massimo.tools.scriptrunner.AbstractTask
com.massimo.tools.scriptrunner.work.SQLTask
com.massimo.tools.scriptrunner.work.ThreadedSQLTask
- All Implemented Interfaces:
- Task
public class ThreadedSQLTask
- extends SQLTask
Execute SQL statements in a number of threads.
Introduces attribute Constants.ATTRIBUTE_THREAD_COUNT.
Fields inherited from class com.massimo.tools.scriptrunner.work.SQLTask |
BIND_END_DELIMITERS, bindNames, connection, dbType, run_id, SQL_CHECK_PREFIX_ORACLE, SQL_CHECK_PREFIX_POSTGRES, SQL_CHECK_SUFFIX_ORACLE, SQL_CHECK_SUFFIX_POSTGRES, SQL_NON_COMMENT_PATTERN, SQL_STMT_PATTERN_ORACLE, SQL_STMT_PATTERN_POSTGRES |
Methods inherited from class com.massimo.tools.scriptrunner.work.SQLTask |
executeSQL, finalize, getBindNames, getLogger, getSQLSplitPattern, getSQLText, getSQLWarning, parseTextIntoStatements, postCheck, preCheck, setBinds, substitiuteBinds, validateBinds, validateSQL |
Methods inherited from class com.massimo.tools.scriptrunner.AbstractTask |
getBooleanProperty, getCurrentWorkingDirectory, getDefinition, getIntProperty, getName, getParent, getProperties, getStartProcessingRow, getText, getType, interrupt, isIgnoreableError, isIgnoreableError, isInterrupted, isLogProgress, postProcess, preProcess, process, resultCodeToString, substituteParameters, toString, validate, validateConnections, validateParameters |
threads
protected Thread[] threads
ThreadedSQLTask
public ThreadedSQLTask(Task parent,
String type,
Element definition,
Map<String,String> parentConnectionProperties)
throws Exception
- Parameters:
parent
- type
- definition
- parentConnectionProperties
-
- Throws:
Exception
doProcess
public int doProcess(ExecutionContext context)
throws Exception
- Implementing classes only need to do their own work and log progress when appropriate.
- Overrides:
doProcess
in class SQLTask
- Returns:
- O for success. Anything else is a failure.
- Throws:
Exception
- See Also:
AbstractTask.process(ExecutionContext)
doValidate
public int doValidate(ValidationContext context)
- Check whether this task should be able to run.
Implementations should check for the prescence of files, attributes,...
- Overrides:
doValidate
in class SQLTask
- Returns:
- O for success. Anything else is a failure.