public abstract class AbstractSynRunnable extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
boolean |
executed
是否已经提交到线程池了
|
Executor |
executor |
protected ReentrantLock |
runningLock |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSynRunnable(Executor executor)
Instantiates a new abstract syn runnable.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
把本任务对象提交到线程池去执行
|
boolean |
isCanceled() |
abstract boolean |
isNeededExecute() |
String |
logstr() |
void |
run() |
abstract void |
runTask() |
void |
setCanceled(boolean isCanceled) |
public boolean executed
protected ReentrantLock runningLock
public Executor executor
protected AbstractSynRunnable(Executor executor)
public void execute()
public abstract boolean isNeededExecute()
public boolean isCanceled()
public abstract void runTask()
public void setCanceled(boolean isCanceled)
public String logstr()
Copyright © 2021. All rights reserved.