Package org.cloudsimplus.traces.google
Enum Class MachineEventType
- All Implemented Interfaces:
Serializable
,Comparable<MachineEventType>
,Constable
Defines the type of an event (a line) in the trace file
that represents the operation to be performed with the
Host
.
Each enum instance is a possible value for the MachineEventField.EVENT_TYPE
field.
This enum defines a some methods to move the processing logic of each event type
to the enum value associated to it. Since the enum includes the process(GoogleMachineEventsTraceReader)
abstract method, if a new enum value is added, we just need to implement the method for that value.
Using such approach we avoid spreading if chains to check which event type a trace line is
to call the corresponding process method.
- Since:
- CloudSim Plus 4.0.0
- Author:
- Manoel Campos da Silva Filho
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MachineEventType
getValue
(int ordinal) Gets an enum instance from its ordinal value.protected abstract boolean
Executes an operation with the Hosts according to the Event Type.static MachineEventType
Returns the enum constant of this class with the specified name.static MachineEventType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
Gets an enum instance from its ordinal value.- Parameters:
ordinal
- the ordinal value to get the enum instance from- Returns:
- the enum instance
-
process
Executes an operation with the Hosts according to the Event Type. Each enum value must implement this method to include its own processing logic.- Parameters:
reader
- the trace file reader- Returns:
- true if trace line for the event type was processed, false otherwise
-