PHP Class pocketmine\scheduler\ServerScheduler

Afficher le fichier Open project: iTXTech/Genisys Class Usage Examples

Méthodes publiques

Свойство Type Description
$WORKERS

Protected Properties

Свойство Type Description
$asyncPool AsyncPool
$currentTick integer
$queue ReversePriorityQueue
$tasks TaskHandler[]

Méthodes publiques

Méthode 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

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

Method Details

__construct() public méthode

public __construct ( )

cancelAllTasks() public méthode

public cancelAllTasks ( )

cancelTask() public méthode

public cancelTask ( integer $taskId )
$taskId integer

cancelTasks() public méthode

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

getAsyncTaskPoolSize() public méthode

increaseAsyncTaskPoolSize() public méthode

public increaseAsyncTaskPoolSize ( $newSize )

isQueued() public méthode

public isQueued ( integer $taskId ) : boolean
$taskId integer
Résultat boolean

mainThreadHeartbeat() public méthode

public mainThreadHeartbeat ( integer $currentTick )
$currentTick integer

scheduleAsyncTask() public méthode

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

scheduleAsyncTaskToWorker() public méthode

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

scheduleDelayedRepeatingTask() public méthode

public scheduleDelayedRepeatingTask ( Task $task, integer $delay, integer $period ) : null | TaskHandler
$task Task
$delay integer
$period integer
Résultat null | TaskHandler

scheduleDelayedTask() public méthode

public scheduleDelayedTask ( Task $task, integer $delay ) : null | TaskHandler
$task Task
$delay integer
Résultat null | TaskHandler

scheduleRepeatingTask() public méthode

public scheduleRepeatingTask ( Task $task, integer $period ) : null | TaskHandler
$task Task
$period integer
Résultat null | TaskHandler

scheduleTask() public méthode

public scheduleTask ( Task $task ) : null | TaskHandler
$task Task
Résultat null | TaskHandler

Property Details

$WORKERS public_oe static_oe property

public static $WORKERS

$asyncPool protected_oe property

protected AsyncPool,pocketmine\scheduler $asyncPool
Résultat AsyncPool

$currentTick protected_oe property

protected int $currentTick
Résultat integer

$queue protected_oe property

protected ReversePriorityQueue $queue
Résultat ReversePriorityQueue

$tasks protected_oe property

protected TaskHandler[],pocketmine\scheduler $tasks
Résultat TaskHandler[]