类 SimpleProcedureScheduler
- java.lang.Object
-
- org.apache.iotdb.confignode.procedure.scheduler.AbstractProcedureScheduler
-
- org.apache.iotdb.confignode.procedure.scheduler.SimpleProcedureScheduler
-
- 所有已实现的接口:
ProcedureScheduler
public class SimpleProcedureScheduler extends AbstractProcedureScheduler
Simple scheduler for procedures
-
-
构造器概要
构造器 构造器 说明 SimpleProcedureScheduler()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddWaiting(Procedure proc)voidclear()Clear current state of scheduler such that it is equivalent to newly created scheduler.protected Proceduredequeue()Fetch one Procedure from the queue NOTE: this method is called with the sched lock held.protected voidenqueue(Procedure procedure, boolean addFront)Add the procedure to the queue.booleanqueueHasRunnables()Returns true if there are procedures available to process.intqueueSize()Returns the number of elements in this queue.voidreleaseWaiting()voidyield(Procedure proc)The procedure can't run at the moment. add it back to the queue, giving priority to someone else.
-
-
-
方法详细资料
-
enqueue
protected void enqueue(Procedure procedure, boolean addFront)
从类复制的说明:AbstractProcedureSchedulerAdd the procedure to the queue. NOTE: this method is called with the sched lock held.- 指定者:
enqueue在类中AbstractProcedureScheduler- 参数:
procedure- the Procedure to addaddFront- true if the item should be added to the front of the queue
-
dequeue
protected Procedure dequeue()
从类复制的说明:AbstractProcedureSchedulerFetch one Procedure from the queue NOTE: this method is called with the sched lock held.- 指定者:
dequeue在类中AbstractProcedureScheduler- 返回:
- the Procedure to execute, or null if nothing is available.
-
clear
public void clear()
从接口复制的说明:ProcedureSchedulerClear current state of scheduler such that it is equivalent to newly created scheduler. Used for testing failure and recovery.
-
yield
public void yield(Procedure proc)
从接口复制的说明:ProcedureSchedulerThe procedure can't run at the moment. add it back to the queue, giving priority to someone else.- 参数:
proc- the Procedure to add back to the list
-
queueHasRunnables
public boolean queueHasRunnables()
从类复制的说明:AbstractProcedureSchedulerReturns true if there are procedures available to process. NOTE: this method is called with the sched lock held.- 指定者:
queueHasRunnables在类中AbstractProcedureScheduler- 返回:
- true if there are procedures available to process, otherwise false.
-
queueSize
public int queueSize()
从类复制的说明:AbstractProcedureSchedulerReturns the number of elements in this queue. NOTE: this method is called with the sched lock held.- 指定者:
queueSize在类中AbstractProcedureScheduler- 返回:
- the number of elements in this queue.
-
addWaiting
public void addWaiting(Procedure proc)
-
releaseWaiting
public void releaseWaiting()
-
-