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

com.alibaba.schedulerx.worker.domain.TaskInfo Maven / Gradle / Ivy

There is a newer version: 1.12.2
Show newest version
package com.alibaba.schedulerx.worker.domain;

/**
 *
 * @author xiaomeng.hxm
 */
public final class TaskInfo {
    private long jobId;
    private long jobInstanceId;
    private long taskId;
    private long batchNo;
    private String taskName;
    private byte[] taskBody;

    private TaskInfo() {}

    public long getTaskId() {
        return taskId;
    }

    public String getTaskName() {
        return taskName;
    }

    public byte[] getTaskBody() {
        return taskBody;
    }
    
    public long getJobId() {
        return jobId;
    }
    
    public long getJobInstanceId() {
        return jobInstanceId;
    }

    public long getBatchNo() {
        return batchNo;
    }

    public static TaskInfoBuilder newBuilder() {
        return new TaskInfoBuilder();
    }

    public static TaskInfoBuilder newBuilder(TaskInfo taskInfo) {
        return new TaskInfoBuilder(taskInfo);
    }

    public static final class TaskInfoBuilder {
        private TaskInfo taskInfo = new TaskInfo();

        private TaskInfoBuilder() {}

        private TaskInfoBuilder(TaskInfo taskInfo) {
            this.taskInfo = taskInfo;
        }

        public TaskInfoBuilder setTaskId(long taskId) {
            this.taskInfo.taskId = taskId;
            return this;
        }

        public TaskInfoBuilder setTaskName(String taskName) {
            this.taskInfo.taskName = taskName;
            return this;
        }

        public TaskInfoBuilder setTaskBody(byte[] taskBody) {
            this.taskInfo.taskBody = taskBody;
            return this;
        }
        
        public TaskInfoBuilder setJobId(long jobId) {
            this.taskInfo.jobId = jobId;
            return this;
        }
    
        public TaskInfoBuilder setJobInstanceId(long jobInstanceId) {
            this.taskInfo.jobInstanceId = jobInstanceId;
            return this;
        }

        public TaskInfoBuilder setBatchNo(long batchNo) {
            this.taskInfo.batchNo = batchNo;
            return this;
        }
        
        public TaskInfo build() {
            return taskInfo;
        }

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy