Package org.cloudsimplus.traces.google
Enum TaskEventType
- java.lang.Object
-
- java.lang.Enum<TaskEventType>
-
- org.cloudsimplus.traces.google.TaskEventType
-
- All Implemented Interfaces:
Serializable
,Comparable<TaskEventType>
public enum TaskEventType extends Enum<TaskEventType>
Defines the type of an event (a line) in the trace file that represents the state of the job. Each enum instance is a possible value for theGoogleTaskEventsTraceReader.FieldIndex.EVENT_TYPE
field.- Since:
- CloudSim Plus 4.0.0
- Author:
- Manoel Campos da Silva Filho
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EVICT
2: A task or job was descheduled because of a higher priority task or job, because the scheduler overcommitted and the actual demand exceeded the machine capacity, because the machine on which it was running became unusable (e.g.FAIL
3: A task or job was descheduled (or, in rare cases, ceased to be eligible for scheduling while it was pending) due to a task failure.FINISH
4: A task or job completed normally.KILL
5: A task or job was cancelled by the user or a driver program or because another job or task on which this job was dependent died.LOST
6: A task or job was presumably terminated, but a record indicating its termination was missing from our source data.SCHEDULE
1: A job or task was scheduled on a machine (it may not start running immediately due to code-shipping time, etc).SUBMIT
0: A task or job became eligible for scheduling.UPDATE_PENDING
7: A task or job’s scheduling class, resource requirements, or constraints were updated while it was waiting to be scheduled.UPDATE_RUNNING
8: A task or job’s scheduling class, resource requirements, or constraints were updated while it was scheduled.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Optional<Cloudlet>
cloudletLookup(DatacenterBroker broker, long uniqueId)
Try to find a Cloudlet with a specific ID inside a given broker identified by the username read from the trace line.static TaskEventType
getValue(int ordinal)
Gets an enum instance from its ordinal value.protected abstract boolean
process(GoogleTaskEventsTraceReader reader)
Executes an operation with the Cloudlet according to the Event Type.static TaskEventType
valueOf(String name)
Returns the enum constant of this type with the specified name.static TaskEventType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUBMIT
public static final TaskEventType SUBMIT
0: A task or job became eligible for scheduling.
-
SCHEDULE
public static final TaskEventType SCHEDULE
1: A job or task was scheduled on a machine (it may not start running immediately due to code-shipping time, etc). For jobs, this occurs the first time any task of the job is scheduled on a machine.
-
EVICT
public static final TaskEventType EVICT
2: A task or job was descheduled because of a higher priority task or job, because the scheduler overcommitted and the actual demand exceeded the machine capacity, because the machine on which it was running became unusable (e.g. taken offline for repairs), or because a disk holding the task’s data was lost.
-
FAIL
public static final TaskEventType FAIL
3: A task or job was descheduled (or, in rare cases, ceased to be eligible for scheduling while it was pending) due to a task failure.
-
FINISH
public static final TaskEventType FINISH
4: A task or job completed normally.
-
KILL
public static final TaskEventType KILL
5: A task or job was cancelled by the user or a driver program or because another job or task on which this job was dependent died.
-
LOST
public static final TaskEventType LOST
6: A task or job was presumably terminated, but a record indicating its termination was missing from our source data.
-
UPDATE_PENDING
public static final TaskEventType UPDATE_PENDING
7: A task or job’s scheduling class, resource requirements, or constraints were updated while it was waiting to be scheduled.
-
UPDATE_RUNNING
public static final TaskEventType UPDATE_RUNNING
8: A task or job’s scheduling class, resource requirements, or constraints were updated while it was scheduled.
-
-
Method Detail
-
values
public static TaskEventType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TaskEventType c : TaskEventType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TaskEventType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
cloudletLookup
protected Optional<Cloudlet> cloudletLookup(DatacenterBroker broker, long uniqueId)
Try to find a Cloudlet with a specific ID inside a given broker identified by the username read from the trace line.
-
getValue
public static TaskEventType getValue(int ordinal)
Gets an enum instance from its ordinal value.- Parameters:
ordinal
- the ordinal value to get the enum instance from- Returns:
- the enum instance
-
process
protected abstract boolean process(GoogleTaskEventsTraceReader reader)
Executes an operation with the Cloudlet according to the Event Type. Each enum value must implement this method to include its own processing logic.- Returns:
- true if trace line for the event type was processed, false otherwise
-
-