public class DBLoadTask<C extends ApplicationContext> extends AbstractAsyncTask<C> implements DBLoadMonitor
DBLoadMonitor
instance is notified each time a record is fetched from the ResultSet. It is up to the
DBLoadMonitor
to process the record.childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Constructor and Description |
---|
DBLoadTask(C ctx,
DBRecord master) |
DBLoadTask(C ctx,
DBRecord master,
SqlCondition condition) |
DBLoadTask(C ctx,
DBRecord master,
SqlCondition condition,
SqlOrder order) |
Modifier and Type | Method and Description |
---|---|
void |
executeAsync()
Must be overridden to perform the async part.
|
int |
getRecordCount() |
protected void |
loadedDBRecord(DBRecord record) |
boolean |
loadedRecord(DBRecord record)
Is called each time a record was fetched from the underlying ResultSet
|
awaitFinished, awaitFinished, awaitStarted, cancel, createTaskId, deregisterTask, doOnFinish, doOnStart, doOnSuccess, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submit, submit, submitInternal, toString, wasSucceeded
addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, hasError, hasMonitor, isCancellable, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cancel, wasCancelled
checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, setCancellable, setName, setResult, setRunStateFlag, sleepChecked
getApplicationContext
execute
addMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor
getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
wasCancelled
getTaskId
toDumpString, toDumpString, toString
public DBLoadTask(C ctx, DBRecord master, SqlCondition condition)
public DBLoadTask(C ctx, DBRecord master, SqlCondition condition, SqlOrder order)
public final void executeAsync() throws java.lang.Exception
AbstractAsyncTask
AbstractAsyncTask.notifyProceeded(Object, int, int, String)
in order to notify
about task progress. Note: the running task should periodically call
AbstractAsyncExecutable.checkCancelled()
in order to detect cancellation.executeAsync
in interface AsyncExecutable<C extends ApplicationContext>
executeAsync
in class AbstractAsyncTask<C extends ApplicationContext>
java.lang.Exception
for synchronous execution
public final boolean loadedRecord(DBRecord record)
DBLoadMonitor
loadedRecord
in interface DBLoadMonitor
record
- The record just fetched from the ResultSetpublic int getRecordCount()
protected void loadedDBRecord(DBRecord record)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.