Group

open class Group(conf: Group.ConfigureFn) : Task<Group>

Constructors

Link copied to clipboard
constructor(conf: Group.ConfigureFn)

Types

Link copied to clipboard
fun interface ConfigureFn

Functions

Link copied to clipboard
open override fun canStart(): Boolean

Implement/override this method to check custom conditions upon which the Task can begin ticking.

Link copied to clipboard
override fun dependedLocks(): Set<Lock>

Returns the set of Locks required for this task to begin. These are checked before canStart.

Link copied to clipboard
override fun dependedTasks(): Set<ITask<*>>

Returns the set of ITasks that need to be completed for this task to begin.

Link copied to clipboard
open fun describeVerbose(): <Error class: unknown class>
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun extendGetDependents(result: MutableSet<ITask<*>>)
Link copied to clipboard
open fun finish()

Stops this task, moving it the Finished state and potentially calling onFinish.

Link copied to clipboard
override fun getDependents(): <Error class: unknown class>

Provides hints for quicker startup times on chains of tasks.

Link copied to clipboard
override fun getId(): Int

Return the task's ID number in the scheduler it's registered to.

Link copied to clipboard
override fun getPriority(): Int

Priority hints which tasks should be processed first. High priority tasks are processed earlier than low priority tasks, in general.

Link copied to clipboard
Link copied to clipboard
override fun getState(): ITask.State

Returns the current State of the Task.

Link copied to clipboard
open override fun getTags(): Set<String>

Returns a set of descriptive tags that apply to this task.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun onFinish(completedNormally: Boolean)

Implement/override this method to handle cleaning up a Task after successful completion or cancellation.

Link copied to clipboard
open override fun onStart()

Implement/override this method to run code when the Task starts for the first time.

Link copied to clipboard
open override fun onTick(): Boolean

Implement/override this method to run code repeatedly during the Task's lifetime.

Link copied to clipboard
open override fun require(before: ITask<*>): Group

Add the provided before task as a dependency for this task.

open override fun require(lock: Lock): Group

Add the provided lock lock as a dependency for this task.

Link copied to clipboard
open fun stop()

Stops this task, moving it the Cancelled state and potentially calling onFinish.

open override fun stop(cancel: Boolean)

Stops this task, moving it to an appropriate final state and potentially calling onFinish.

Link copied to clipboard
open override fun <T : ITask<T>> then(other: T): T

Sets up the provided other task to run after this task completes, adding it to the dependency tree.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun transition(newState: ITask.State)

Updates the current State of the Task.