RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.task.TickableTask Class Referenceabstract
Inheritance diagram for com.runehive.game.task.TickableTask:
Collaboration diagram for com.runehive.game.task.TickableTask:

Public Member Functions

void execute ()
 A function representing the unit of work that will be carried out.
 TickableTask (boolean instant, int delay)
Public Member Functions inherited from com.runehive.game.task.Task
Task attach (Object newKey)
 Attaches a new key.
synchronized final void cancel ()
 Cancels all subsequent executions.
synchronized final void cancel (boolean logout)
 Cancels all subsequent executions.
boolean canRun ()
 Determines if the task can be ran.
Optional< Object > getAttachment ()
String getCreationStackTraceStr ()
int getDelay ()
Long getElapsedTimeFromRunStartTime ()
Optional< Long > getRunStartTime ()
long getTaskCreationTime ()
String getTaskId ()
boolean isInstant ()
boolean isRunning ()
void setDelay (int delay)
 Sets the cyclic delay.
void setExecutionTime ()
 Task (boolean instant, int delay)
 Creates a new Task.
 Task (int delay)
 Creates a new Task that doesn't execute instantly.

Protected Member Functions

abstract void tick ()
Protected Member Functions inherited from com.runehive.game.task.Task
void baseExecute ()
boolean canSchedule ()
 A function executed on registration.
void onCancel (boolean logout)
 A function executed on cancellation.
void onSchedule ()
 A function executed on registration.

Protected Attributes

int tick

Additional Inherited Members

Package Functions inherited from com.runehive.game.task.Task
void onException (Exception e)
 A function executed on thrown exceptions.
void onLoop ()
 A function executed when iterated over.
final synchronized void process ()
synchronized void setRunning (boolean running)

Detailed Description

Definition at line 3 of file TickableTask.java.

Constructor & Destructor Documentation

◆ TickableTask()

com.runehive.game.task.TickableTask.TickableTask ( boolean instant,
int delay )

Definition at line 7 of file TickableTask.java.

7 {
8 super(instant, delay);
9 }

References com.runehive.game.task.Task.delay, and com.runehive.game.task.Task.instant.

Member Function Documentation

◆ execute()

void com.runehive.game.task.TickableTask.execute ( )

A function representing the unit of work that will be carried out.

Reimplemented from com.runehive.game.task.Task.

Definition at line 14 of file TickableTask.java.

14 {
15 tick();
16 tick++;
17 }

References tick.

◆ tick()

Member Data Documentation

◆ tick


The documentation for this class was generated from the following file: