5 Star 22 Fork 7

chararch/gobatch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
listener.go 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
chararch 提交于 2022-05-03 13:14 . 文档&代码微调
package gobatch
//JobListener job listener
type JobListener interface {
//BeforeJob execute before job start
BeforeJob(execution *JobExecution) BatchError
//AfterJob execute after job end either normally or abnormally
AfterJob(execution *JobExecution) BatchError
}
//StepListener job listener
type StepListener interface {
//BeforeStep execute before step start
BeforeStep(execution *StepExecution) BatchError
//AfterStep execute after step end either normally or abnormally
AfterStep(execution *StepExecution) BatchError
}
//ChunkListener job listener
type ChunkListener interface {
//BeforeChunk execute before start of a chunk in a chunkStep
BeforeChunk(context *ChunkContext) BatchError
//AfterChunk execute after end of a chunk in a chunkStep
AfterChunk(context *ChunkContext) BatchError
//OnError execute when an error occurred during a chunk in a chunkStep
OnError(context *ChunkContext, err BatchError)
}
//PartitionListener job listener
type PartitionListener interface {
//BeforePartition execute before enter into Partitioner.Partition() in a partitionStep
BeforePartition(execution *StepExecution) BatchError
//AfterPartition execute after return from Partitioner.Partition() in a partitionStep
AfterPartition(execution *StepExecution, subExecutions []*StepExecution) BatchError
//OnError execute when an error return from Partitioner.Partition() in a partitionStep
OnError(execution *StepExecution, err BatchError)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/chararch/gobatch.git
git@gitee.com:chararch/gobatch.git
chararch
gobatch
gobatch
master

搜索帮助