#include <ReplicaTask.h>
Inherited by GridMate::ReplicaDestroyPeerTask, GridMate::ReplicaMarshalTaskBase, and GridMate::ReplicaUpdateTaskBase.
|
enum | TaskStatus { Done,
Repeat
} |
|
typedef AZ::u64 | PriorityType |
|
|
static const unsigned int | k_ageScale = 10 |
|
Base class for the all tasks in task system. Every subclassed class should implement GetPriority() and Run() methods to be able to be queued and executed from within TaskSystem.
◆ Cancel()
void GridMate::ReplicaTask::Cancel |
( |
| ) |
|
|
inline |
This method sets cancelled state on the task. The task will not be executed and will be deleted on next TaskManager's tick. The task will be deleted upon completion when it's cancelled while executing.
◆ GetAge()
unsigned int GridMate::ReplicaTask::GetAge |
( |
| ) |
const |
|
inline |
Returns 'age' of the task. Age indicates for how many frame ticks this task was postponed.
◆ GetPriority()
PriorityType GridMate::ReplicaTask::GetPriority |
( |
| ) |
const |
|
inline |
Returns a cached priority for a task
◆ GetReplica()
ReplicaPtr GridMate::ReplicaTask::GetReplica |
( |
| ) |
const |
|
inline |
Returns replica associated with the task, nullptr if task is not bound to any replica
◆ IsCancelled()
bool GridMate::ReplicaTask::IsCancelled |
( |
| ) |
const |
|
inline |
Indicates whether the task is cancelled.
- Returns
- true if cancelled, false otherwise
◆ Run()
virtual TaskStatus GridMate::ReplicaTask::Run |
( |
const RunContext & |
context | ) |
|
|
pure virtual |
◆ SetAge()
void GridMate::ReplicaTask::SetAge |
( |
unsigned int |
age | ) |
|
|
inline |
Setter for age. Typically age is only modified by task manager.
◆ SetPriority()
void GridMate::ReplicaTask::SetPriority |
( |
PriorityType |
priority | ) |
|
|
inline |
Saves priority in a task.
The documentation for this class was generated from the following file:
- Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaTask.h