public class JdbcBatchProgressMonitor extends AbstractBatchProgressMonitor implements IBatchProgressMonitorExt
currentChildren, currentItem, done, endTime, executionId, itemCount, parent, rejectedItems, startTime, successItems, taskName, totalWork, worked
UNKNOW
Constructor and Description |
---|
JdbcBatchProgressMonitor(String executionId,
IBatch batch,
BatchDao bachDao)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTask(String name,
String description,
int totalWork)
Begin a task execution.
|
void |
done()
Set the task is done.
|
void |
fail(String reason)
Report global failure.
|
void |
fail(String reason,
Throwable t)
Report global failure.
|
Batch |
getBatch() |
protected JdbcBatchProgressMonitor |
getMainMonitor()
Get the top parent.
|
protected JdbcBatchManager |
getManager() |
void |
message(String message)
Send a message during the task execution.
|
protected IBatchProgressMonitor |
newInstance(int work) |
protected void |
onBatchEnd() |
void |
reject(String[] itemIds,
String reason)
Reject a set of items during the task processing.
|
void |
reject(String[] itemIds,
String reason,
Throwable e)
Reject a set of items during the task processing.
|
void |
reject(String itemId,
String reason)
Reject one item during the task processing.
|
void |
reject(String itemId,
String reason,
Throwable e)
* Reject one item during the task processing.
|
void |
setCurrentItem(Object item)
Set the current item which is being processed.
|
protected void |
setManager(JdbcBatchManager manager) |
void |
worked(int work)
Notify the processing of items.
|
createSubTask, endBatch, endTask, getCurrentItem, getEndDate, getItemCount, getLastMessage, getLastUpdate, getLogger, getParentWork, getProgress, getRejectedItems, getStartDate, getTaskDescription, getTaskGroup, getTaskName, getTotalWork, getWritingDelay, isCancelRequested, isDone, isSuccess, setLogger, setTotalWork, setWritingDelay, touch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getItemCount, getLastMessage, getProgress, getTotalWork
createSubTask, getLastUpdate, isCancelRequested, setLogger
public void done()
AbstractBatchProgressMonitor
done
in interface IBatchProgressMonitor
done
in class AbstractBatchProgressMonitor
public void fail(String reason)
IBatchProgressMonitor
Use this when the batch has issued a major error and cannot continue.
fail
in interface IBatchProgressMonitor
fail
in class AbstractBatchProgressMonitor
public void fail(String reason, Throwable t)
IBatchProgressMonitor
Use this when the batch has issued a major error and cannot continue.
fail
in interface IBatchProgressMonitor
fail
in class AbstractBatchProgressMonitor
t
- Exception which caused the failure.public void reject(String itemId, String reason)
AbstractBatchProgressMonitor
Use this when :
reject
in interface IBatchProgressMonitor
reject
in class AbstractBatchProgressMonitor
itemId
- rejected item idreason
- the reasonIBatchProgressMonitor#reject(String, String, Throwable) can be used
to provide the exception which has caused the failure.
public void reject(String[] itemIds, String reason)
AbstractBatchProgressMonitor
reject
in interface IBatchProgressMonitor
reject
in class AbstractBatchProgressMonitor
itemIds
- Array of item ids rejectedreason
- the reasonIBatchProgressMonitor.reject(String, String)
public void reject(String[] itemIds, String reason, Throwable e)
AbstractBatchProgressMonitor
reject
in interface IBatchProgressMonitor
reject
in class AbstractBatchProgressMonitor
e
- ExceptionIBatchProgressMonitor.reject(String, String)
public Batch getBatch()
getBatch
in class AbstractBatchProgressMonitor
public void beginTask(String name, String description, int totalWork)
AbstractBatchProgressMonitor
beginTask
in interface IBatchProgressMonitor
beginTask
in class AbstractBatchProgressMonitor
name
- task namedescription
- task descriptiontotalWork
- task amount of work to be doneprotected JdbcBatchProgressMonitor getMainMonitor()
AbstractBatchProgressMonitor
getMainMonitor
in class AbstractBatchProgressMonitor
public void message(String message)
AbstractBatchProgressMonitor
message
in interface IBatchProgressMonitor
message
in class AbstractBatchProgressMonitor
message
- messageprotected IBatchProgressMonitor newInstance(int work)
newInstance
in class AbstractBatchProgressMonitor
public void reject(String itemId, String reason, Throwable e)
AbstractBatchProgressMonitor
reject
in interface IBatchProgressMonitor
reject
in class AbstractBatchProgressMonitor
e
- ExceptionIBatchProgressMonitor.reject(String, String)
public void setCurrentItem(Object item)
AbstractBatchProgressMonitor
setCurrentItem
in interface IBatchProgressMonitor
setCurrentItem
in class AbstractBatchProgressMonitor
item
- current processed itemprotected void onBatchEnd()
onBatchEnd
in class AbstractBatchProgressMonitor
public void worked(int work)
worked
in interface IBatchProgressMonitor
worked
in class AbstractBatchProgressMonitor
work
- items processedprotected void setManager(JdbcBatchManager manager)
protected JdbcBatchManager getManager()
Copyright © 2010–2016. All rights reserved.