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

uw.task.entity.TaskRunnerConfig Maven / Gradle / Ivy

Go to download

uw-task包是一个分布式任务框架,通过uw-task可以快速构建基于docker的分布式任务体系,同时支持基于influx的任务运维监控。

The newest version!
package uw.task.entity;

import java.io.Serializable;

/**
 * taskRunnerConfig实体类。
 * 
 * 
 * @author axeon
 * @version $Revision: 1.00 $ $Date: 2017-05-03 14:00:50
 */
public class TaskRunnerConfig implements Serializable{
	
	private static final long serialVersionUID = 1L;
	

	private long id = -1;

	/**
	 * 任务名称
	 */
	private String taskName;

	/**
	 * 任务描述
	 */
	private String taskDesc;
	
	/**
	 * 执行类信息
	 */
	private String taskClass;

	/**
	 * 消费者的数量
	 */
	private int consumerNum = 1;

	/**
	 * 0代表不限速,1代表本机限速,2代表全局限速
	 */
	private int rateLimitType = 1;

	/**
	 * 流量限定数值,默认为60次
	 */
	private int rateLimitValue = 60;

	/**
	 * 流量限定时间(S),默认为60秒
	 */
	private int rateLimitTime = 60;

	/**
	 * 当发生流量限制时,等待的秒数,默认300秒
	 */
	private int rateLimitWait = 300;

	/**
	 * 超过流量限制重试次数
	 */
	private int retryTimesByOverrated = 0;

	/**
	 * 对方接口错误重试次数
	 */
	private int retryTimesByPartner = 0;

	/**
	 * 运行目标,默认不指定
	 */
	private String targetHost = "";


	public TaskRunnerConfig() {
	}

	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}

	/**
	 * @return the taskName
	 */
	public String getTaskName() {
		return taskName;
	}

	/**
	 * @param taskName the taskName to set
	 */
	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	/**
	 * @return the taskDesc
	 */
	public String getTaskDesc() {
		return taskDesc;
	}

	/**
	 * @param taskDesc the taskDesc to set
	 */
	public void setTaskDesc(String taskDesc) {
		this.taskDesc = taskDesc;
	}

	/**
	 * @return the taskClass
	 */
	public String getTaskClass() {
		return taskClass;
	}

	/**
	 * @param taskClass the taskClass to set
	 */
	public void setTaskClass(String taskClass) {
		this.taskClass = taskClass;
	}

	/**
	 * @return the consumerNum
	 */
	public int getConsumerNum() {
		return consumerNum;
	}

	/**
	 * @param consumerNum the consumerNum to set
	 */
	public void setConsumerNum(int consumerNum) {
		this.consumerNum = consumerNum;
	}

	/**
	 * @return the rateLimitType
	 */
	public int getRateLimitType() {
		return rateLimitType;
	}

	/**
	 * @param rateLimitType the rateLimitType to set
	 */
	public void setRateLimitType(int rateLimitType) {
		this.rateLimitType = rateLimitType;
	}

	/**
	 * @return the rateLimitValue
	 */
	public int getRateLimitValue() {
		return rateLimitValue;
	}

	/**
	 * @param rateLimitValue the rateLimitValue to set
	 */
	public void setRateLimitValue(int rateLimitValue) {
		this.rateLimitValue = rateLimitValue;
	}

	/**
	 * @return the rateLimitTime
	 */
	public int getRateLimitTime() {
		return rateLimitTime;
	}

	/**
	 * @param rateLimitTime the rateLimitTime to set
	 */
	public void setRateLimitTime(int rateLimitTime) {
		this.rateLimitTime = rateLimitTime;
	}

	/**
	 * @return the rateLimitWait
	 */
	public int getRateLimitWait() {
		return rateLimitWait;
	}

	/**
	 * @param rateLimitWait the rateLimitWait to set
	 */
	public void setRateLimitWait(int rateLimitWait) {
		this.rateLimitWait = rateLimitWait;
	}

	/**
	 * @return the retryTimesByOverrated
	 */
	public int getRetryTimesByOverrated() {
		return retryTimesByOverrated;
	}

	/**
	 * @param retryTimesByOverrated the retryTimesByOverrated to set
	 */
	public void setRetryTimesByOverrated(int retryTimesByOverrated) {
		this.retryTimesByOverrated = retryTimesByOverrated;
	}

	/**
	 * @return the retryTimesByPartner
	 */
	public int getRetryTimesByPartner() {
		return retryTimesByPartner;
	}

	/**
	 * @param retryTimesByPartner the retryTimesByPartner to set
	 */
	public void setRetryTimesByPartner(int retryTimesByPartner) {
		this.retryTimesByPartner = retryTimesByPartner;
	}

	/**
	 * @return the targetHost
	 */
	public String getTargetHost() {
		return targetHost;
	}

	/**
	 * @param targetHost the targetHost to set
	 */
	public void setTargetHost(String targetHost) {
		this.targetHost = targetHost;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy