PHP Class pocketmine\scheduler\ServerScheduler

Datei anzeigen Open project: iTXTech/Genisys Class Usage Examples

Public Properties

Property Type Description
$WORKERS

Protected Properties

Property Type Description
$asyncPool AsyncPool
$currentTick integer
$queue ReversePriorityQueue
$tasks TaskHandler[]

Public Methods

Method Description
__construct ( )
cancelAllTasks ( )
cancelTask ( integer $taskId )
cancelTasks ( pocketmine\plugin\Plugin $plugin )
getAsyncTaskPoolSize ( )
increaseAsyncTaskPoolSize ( $newSize )
isQueued ( integer $taskId ) : boolean
mainThreadHeartbeat ( integer $currentTick )
scheduleAsyncTask ( AsyncTask $task ) : void Submits an asynchronous task to the Worker Pool
scheduleAsyncTaskToWorker ( AsyncTask $task, integer $worker ) : void Submits an asynchronous task to a specific Worker in the Pool
scheduleDelayedRepeatingTask ( Task $task, integer $delay, integer $period ) : null | TaskHandler
scheduleDelayedTask ( Task $task, integer $delay ) : null | TaskHandler
scheduleRepeatingTask ( Task $task, integer $period ) : null | TaskHandler
scheduleTask ( Task $task ) : null | TaskHandler

Private Methods

Method Description
addTask ( Task $task, $delay, $period ) : null | TaskHandler
handle ( TaskHandler $handler )
isReady ( $currentTicks )
nextId ( ) : integer

Method Details

__construct() public method

public __construct ( )

cancelAllTasks() public method

public cancelAllTasks ( )

cancelTask() public method

public cancelTask ( integer $taskId )
$taskId integer

cancelTasks() public method

public cancelTasks ( pocketmine\plugin\Plugin $plugin )
$plugin pocketmine\plugin\Plugin

getAsyncTaskPoolSize() public method

increaseAsyncTaskPoolSize() public method

public increaseAsyncTaskPoolSize ( $newSize )

isQueued() public method

public isQueued ( integer $taskId ) : boolean
$taskId integer
return boolean

mainThreadHeartbeat() public method

public mainThreadHeartbeat ( integer $currentTick )
$currentTick integer

scheduleAsyncTask() public method

Submits an asynchronous task to the Worker Pool
public scheduleAsyncTask ( AsyncTask $task ) : void
$task AsyncTask
return void

scheduleAsyncTaskToWorker() public method

Submits an asynchronous task to a specific Worker in the Pool
public scheduleAsyncTaskToWorker ( AsyncTask $task, integer $worker ) : void
$task AsyncTask
$worker integer
return void

scheduleDelayedRepeatingTask() public method

public scheduleDelayedRepeatingTask ( Task $task, integer $delay, integer $period ) : null | TaskHandler
$task Task
$delay integer
$period integer
return null | TaskHandler

scheduleDelayedTask() public method

public scheduleDelayedTask ( Task $task, integer $delay ) : null | TaskHandler
$task Task
$delay integer
return null | TaskHandler

scheduleRepeatingTask() public method

public scheduleRepeatingTask ( Task $task, integer $period ) : null | TaskHandler
$task Task
$period integer
return null | TaskHandler

scheduleTask() public method

public scheduleTask ( Task $task ) : null | TaskHandler
$task Task
return null | TaskHandler

Property Details

$WORKERS public_oe static_oe property

public static $WORKERS

$asyncPool protected_oe property

protected AsyncPool,pocketmine\scheduler $asyncPool
return AsyncPool

$currentTick protected_oe property

protected int $currentTick
return integer

$queue protected_oe property

protected ReversePriorityQueue $queue
return ReversePriorityQueue

$tasks protected_oe property

protected TaskHandler[],pocketmine\scheduler $tasks
return TaskHandler[]