Package com.redis.riot
Class ProgressMonitor
- java.lang.Object
-
- com.redis.riot.ProgressMonitor
-
- All Implemented Interfaces:
org.springframework.batch.core.ItemWriteListener
,org.springframework.batch.core.StepExecutionListener
,org.springframework.batch.core.StepListener
public class ProgressMonitor extends java.lang.Object implements org.springframework.batch.core.StepExecutionListener, org.springframework.batch.core.ItemWriteListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProgressMonitor.ProgressMonitorBuilder
-
Field Summary
Fields Modifier and Type Field Description protected me.tongfei.progressbar.ProgressBar
progressBar
-
Constructor Summary
Constructors Constructor Description ProgressMonitor(TransferOptions.Progress style, java.lang.String taskName, java.time.Duration updateInterval, java.util.function.Supplier<java.lang.Long> initialMax)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.batch.core.ExitStatus
afterStep(org.springframework.batch.core.StepExecution stepExecution)
void
afterWrite(java.util.List items)
void
beforeStep(org.springframework.batch.core.StepExecution stepExecution)
void
beforeWrite(java.util.List items)
static ProgressMonitor.ProgressMonitorBuilder
builder()
void
onWriteError(java.lang.Exception exception, java.util.List items)
-
-
-
Constructor Detail
-
ProgressMonitor
public ProgressMonitor(TransferOptions.Progress style, java.lang.String taskName, java.time.Duration updateInterval, java.util.function.Supplier<java.lang.Long> initialMax)
-
-
Method Detail
-
beforeStep
public void beforeStep(org.springframework.batch.core.StepExecution stepExecution)
- Specified by:
beforeStep
in interfaceorg.springframework.batch.core.StepExecutionListener
-
afterStep
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution)
- Specified by:
afterStep
in interfaceorg.springframework.batch.core.StepExecutionListener
-
beforeWrite
public void beforeWrite(java.util.List items)
- Specified by:
beforeWrite
in interfaceorg.springframework.batch.core.ItemWriteListener
-
afterWrite
public void afterWrite(java.util.List items)
- Specified by:
afterWrite
in interfaceorg.springframework.batch.core.ItemWriteListener
-
onWriteError
public void onWriteError(java.lang.Exception exception, java.util.List items)
- Specified by:
onWriteError
in interfaceorg.springframework.batch.core.ItemWriteListener
-
builder
public static ProgressMonitor.ProgressMonitorBuilder builder()
-
-