Commit e445a98e by huangfusuper

守护线程规范类修改

parent 94332515
...@@ -7,10 +7,18 @@ import javax.sql.DataSource; ...@@ -7,10 +7,18 @@ import javax.sql.DataSource;
*/ */
public abstract class BaseThreadRunHelper { public abstract class BaseThreadRunHelper {
/** /**
* 通用等待时间
*/
public final Long UNIVERSAL_WAIT_TIME = 20000L;
/**
* 不需要等待
*/
public final Long NOT_WAIT_TIME = 100L;
/**
* 具体要做的业务操作 * 具体要做的业务操作
* @return 返回是否需要睡眠 * @return 睡眠的时间
*/ */
public abstract boolean start(); public abstract Long start();
/** /**
* 返回数据库运行实例 * 返回数据库运行实例
...@@ -23,12 +31,4 @@ public abstract class BaseThreadRunHelper { ...@@ -23,12 +31,4 @@ public abstract class BaseThreadRunHelper {
* @return 返回行锁名称 * @return 返回行锁名称
*/ */
public abstract String getLockName(); public abstract String getLockName();
/**
* 返回循环一轮的睡眠时间
* @return 睡眠时长
*/
public long getSleepTime(){
return 20000;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment