p2pMapReduce.nodeModule.event
Enum EventType

java.lang.Object
  extended by java.lang.Enum<EventType>
      extended by p2pMapReduce.nodeModule.event.EventType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<EventType>

public enum EventType
extends java.lang.Enum<EventType>

Enumeration of all the well known event type for the P2PMapReduce framework.


Enum Constant Summary
BACKUP_JOB_ASSIGNED
          Used by primary node to assign a backup job to a master node.
BACKUP_JOB_COMPLETED
          Used to notify the completion of a backup job Associated parameters array: 0) String: id of the job for which the backup job has been completed
BACKUP_MASTER_FAILURE
          InnerEvent.
BECOME_MASTER
          Associated parameters array: 0) String: id of the coordinator which sends the event
BECOME_SLAVE
          No parameters
CLOSE_EVENT
          Closing of a connection
COORD_ELECTION_MESSAGE
          Coordinator Election Algorithm message Associated parameters array: 0) String: the id of the node
COORDINATOR_FAILURE
          InnerEvent.
CRASH_EVENT
          Crash of a connection
JOB_ASSIGNED
          Used to assign a new job to a master node.
JOB_COMPLETED
          Used to notify the completion of a job.
JOB_ID_REPLY
          Used by a master node to respond to an user job id request.
JOB_ID_REQUEST
          Used by user node to request a new unique job id to a master node.
JOB_REASSIGNED
          Used to reassign a job to a backup master node in consequence of the primary failure Associated parameters array: 0) BackupJob: The backup job object representing the job
JOB_UPDATE
          Used by primary nodes to sends job updates information to the backup master.
NEW_CONNECTION
          Inner event Creation of a new connection Associated parameters array: 0) The connection object (ConnectionIF)
NEW_COORDINATOR
          Sent from the new coordinator to other masters.
NODE_FAILURE
          Inner event.
OUTPUT_RETRIEVING_COMPLETED
          Used by user node to notify the JobManager about the success or failure of the reduce output retrieving.
PRIMARY_ELECTION_MESSAGE
          Primary Election Algorithm message Associated parameters array: 0) String: id of the job 1) String: id of the node 2) Double: load value of the node
PRIMARY_FAILURE
          Inner event Used to notify the failure of a primary node.
PRIMARY_UPDATE
          Used by the newly elected primary to inform all other interested nodes that it has become the new primary node for a specified job Associated parameters array: 0) String: id of the job for which a new primary has been elected. 1) String: id of the new primary node for the job 2) Double: load value of the new primary node
REDUCE_COMPLETED
          Used by primary node to notify user that a reduce task has been completed.
REMOTE_NODEINFO
          Used in connection start up to send the local node info to the remote endpoint
SLAVE_CHECK
          Used by a slave node as an heartbeat message to inform a primary node that a task it is managing is still alive Associated parameters array: 0) String: id of the task
SLAVE_FAILURE
          InnerEvent.
TASK_ASSIGNED
          Used by a primary node to assign a task list to a slave node.
TASK_COMPLETED
          Used by a slave node to notify the primary about a task completion.
 
Method Summary
static EventType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static EventType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BECOME_MASTER

public static final EventType BECOME_MASTER
Associated parameters array: 0) String: id of the coordinator which sends the event


BECOME_SLAVE

public static final EventType BECOME_SLAVE
No parameters


JOB_ID_REQUEST

public static final EventType JOB_ID_REQUEST
Used by user node to request a new unique job id to a master node. Associated parameters array: 0) Integer: user request number 1) {@link NodeInfo: node info of user node


JOB_ID_REPLY

public static final EventType JOB_ID_REPLY
Used by a master node to respond to an user job id request. Associated parameters array: 0) Integer: user request number 1) JobID: an unique job id


JOB_ASSIGNED

public static final EventType JOB_ASSIGNED
Used to assign a new job to a master node. Associated parameters array: 0) Job: the assigned job object 1) NodeInfo: Node info object of the user node that has submitted the job


JOB_REASSIGNED

public static final EventType JOB_REASSIGNED
Used to reassign a job to a backup master node in consequence of the primary failure Associated parameters array: 0) BackupJob: The backup job object representing the job


JOB_COMPLETED

public static final EventType JOB_COMPLETED
Used to notify the completion of a job. Associated parameters array: 0) String: id of the completed job 1) JobStatus.State: an object representation of the completion state


BACKUP_JOB_ASSIGNED

public static final EventType BACKUP_JOB_ASSIGNED
Used by primary node to assign a backup job to a master node. Associated parameters array: 0) PrimaryJob: an object representing the job for which the backup job is assigned 1) String: id of the primary node


JOB_UPDATE

public static final EventType JOB_UPDATE
Used by primary nodes to sends job updates information to the backup master. Associated parameters array: 0) String: id of the job 1) LinkedList<String>: updated backup master list 2) LinkedList<JobTask>: updated job task list


REDUCE_COMPLETED

public static final EventType REDUCE_COMPLETED
Used by primary node to notify user that a reduce task has been completed. Associated parameters array: 0) JobTask: the job task object relative to the completed reduce task 1) NodeInfo: node info of the primary node


OUTPUT_RETRIEVING_COMPLETED

public static final EventType OUTPUT_RETRIEVING_COMPLETED
Used by user node to notify the JobManager about the success or failure of the reduce output retrieving. Associated parameters array: 0 JobTask: JobTask relative to the reduce task 1 Boolean: true if the output has been retrieved successfully, false otherwise


BACKUP_JOB_COMPLETED

public static final EventType BACKUP_JOB_COMPLETED
Used to notify the completion of a backup job Associated parameters array: 0) String: id of the job for which the backup job has been completed


TASK_ASSIGNED

public static final EventType TASK_ASSIGNED
Used by a primary node to assign a task list to a slave node. Associated parameters array: 0) LinkedList<Task>: assigned task list 1) String: id of the primary node


TASK_COMPLETED

public static final EventType TASK_COMPLETED
Used by a slave node to notify the primary about a task completion. Associated parameters array: 0) String: id of the task attempt 1) Task.TaskStatus: task status


SLAVE_CHECK

public static final EventType SLAVE_CHECK
Used by a slave node as an heartbeat message to inform a primary node that a task it is managing is still alive Associated parameters array: 0) String: id of the task


COORD_ELECTION_MESSAGE

public static final EventType COORD_ELECTION_MESSAGE
Coordinator Election Algorithm message Associated parameters array: 0) String: the id of the node


NEW_COORDINATOR

public static final EventType NEW_COORDINATOR
Sent from the new coordinator to other masters. Associated parameters array: 0) String: id of the new coordinator


PRIMARY_FAILURE

public static final EventType PRIMARY_FAILURE
Inner event Used to notify the failure of a primary node. Associated parameters array: 0) String: id of the failed primary node


PRIMARY_ELECTION_MESSAGE

public static final EventType PRIMARY_ELECTION_MESSAGE
Primary Election Algorithm message Associated parameters array: 0) String: id of the job 1) String: id of the node 2) Double: load value of the node


PRIMARY_UPDATE

public static final EventType PRIMARY_UPDATE
Used by the newly elected primary to inform all other interested nodes that it has become the new primary node for a specified job Associated parameters array: 0) String: id of the job for which a new primary has been elected. 1) String: id of the new primary node for the job 2) Double: load value of the new primary node


COORDINATOR_FAILURE

public static final EventType COORDINATOR_FAILURE
InnerEvent. Used to notify the failure of the coordinator. No parameters (the coordinator id must be already known)


SLAVE_FAILURE

public static final EventType SLAVE_FAILURE
InnerEvent. Used to notify the failure of a slave node. 0) String: id of failed slave node


BACKUP_MASTER_FAILURE

public static final EventType BACKUP_MASTER_FAILURE
InnerEvent. Used to notify the failure of a backup master node. 0) String: id of failed backup master node


NODE_FAILURE

public static final EventType NODE_FAILURE
Inner event. Low level event that notified a failure of a remote node. Associated parameters array: 0) String: id of the failed node


NEW_CONNECTION

public static final EventType NEW_CONNECTION
Inner event Creation of a new connection Associated parameters array: 0) The connection object (ConnectionIF)


CRASH_EVENT

public static final EventType CRASH_EVENT
Crash of a connection


CLOSE_EVENT

public static final EventType CLOSE_EVENT
Closing of a connection


REMOTE_NODEINFO

public static final EventType REMOTE_NODEINFO
Used in connection start up to send the local node info to the remote endpoint

Method Detail

values

public static EventType[] 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 (EventType c : EventType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EventType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null