public enum MachineEventType

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 FieldIndex.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.

Author:Manoel Campos da Silva Filho

Enum Constants


public static final MachineEventType ADD

0: A Host became available to the cluster - all machines in the trace will have an ADD event.


public static final MachineEventType REMOVE

1: A Host was removed from the cluster. Removals can occur due to failures or maintenance.


public static final MachineEventType UPDATE

2: A Host available to the cluster had its available resources changed.