All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.shoulder.batch.model.BatchDataSlice Maven / Gradle / Ivy

Go to download

Shoulder 扩展-批处理模块,提供批量数据导入、导出、异步校验、导入历史记录管理等能力。

There is a newer version: 0.8.1
Show newest version
package org.shoulder.batch.model;

import lombok.Builder;
import lombok.Data;

import java.util.List;

/**
 * 批量任务分片
 * 已经被拆分过的,可直接执行的任务分片,通常比 {@link BatchData} 粒度更细
 * 数据类型 dataType, 操作类型 operationType 全部确定,且所有数据相同
 *
 * @author lym
 */
@Data
@Builder
public class BatchDataSlice {

    /**
     * 批处理任务标识
     * 其实可通过 BatchDataWorker 来填充。未来可能调整,预留该字段
     */
    private String taskId;

    /**
     * taskId 中的第几个子任务
     */
    private int sequence;

    /**
     * 数据类型
     */
    private String dataType;

    /**
     * 操作类型:ADD / UPDATE...
     */
    protected String operationType;

    /**
     * 要批量处理的数据
     */
    private List batchList;

    public BatchDataSlice() {
    }

    public BatchDataSlice(String taskId, int sequence, String dataType, String operationType, List batchList) {
        this.taskId = taskId;
        this.sequence = sequence;
        this.dataType = dataType;
        this.operationType = operationType;
        this.batchList = batchList;
    }

    @Override
    public String toString() {
        return "BatchDataSlice{" +
            "taskId='" + taskId + '\'' +
            ", sequence=" + sequence +
            ", dataType='" + dataType + '\'' +
            ", operationType='" + operationType + '\'' +
            ", batchList.size=" + batchList.size() +
            '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy