public abstract class AbstractSynRunnable extends Object implements Runnable
| 限定符和类型 | 字段和说明 |
|---|---|
AtomicInteger |
avoidRepeatExecuteCount
避免重复提交次数
|
AtomicInteger |
executeCount
提交成功次数
|
Executor |
executor |
AtomicInteger |
loopCount
被循环执行的次数
|
AtomicInteger |
runCount
运行次数
|
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractSynRunnable(Executor executor)
Instantiates a new abstract syn runnable.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute()
把本任务对象提交到线程池去执行
|
boolean |
isCanceled() |
boolean |
isExecuted()
是否已经提交到线程池了
|
abstract boolean |
isNeededExecute() |
String |
logstr() |
void |
run() |
ReadWriteLock |
runningLock() |
abstract void |
runTask() |
void |
setCanceled(boolean isCanceled) |
void |
setExecuted(boolean executed)
是否已经提交到线程池了
|
public AtomicInteger executeCount
public AtomicInteger avoidRepeatExecuteCount
public AtomicInteger loopCount
public AtomicInteger runCount
public Executor executor
protected AbstractSynRunnable(Executor executor)
public void execute()
public abstract boolean isNeededExecute()
public boolean isCanceled()
public abstract void runTask()
public ReadWriteLock runningLock()
public void setCanceled(boolean isCanceled)
public boolean isExecuted()
public void setExecuted(boolean executed)
executed - the executed to setpublic String logstr()
Copyright © 2019. All rights reserved.