Package it.unitn.disi.ds1.qtop
Class Node
java.lang.Object
akka.actor.AbstractActor
it.unitn.disi.ds1.qtop.Node
- All Implemented Interfaces:
- akka.actor.Actor
public class Node
extends akka.actor.AbstractActor
Node class, it represents a single node in the network. It can be either receiver or coordinator.
 During the election all the nodes become voters.
- 
Nested Class SummaryNested classes/interfaces inherited from class akka.actor.AbstractActorakka.actor.AbstractActor.ActorContext, akka.actor.AbstractActor.ReceiveNested classes/interfaces inherited from interface akka.actor.Actorakka.actor.Actor.emptyBehavior$, akka.actor.Actor.ignoringBehavior$
- 
Constructor SummaryConstructorsConstructorDescriptionNode(akka.actor.ActorRef coordinator, int nodeId, int voteTimeout, int writeTimeout, int electionGlobalTimeout, int numberOfNodes) Constructor for the Node class.
- 
Method SummaryModifier and TypeMethodDescriptionakka.actor.AbstractActor.ReceiveMask for to the Receiver actor.static akka.actor.Propsprops(akka.actor.ActorRef coordinator, int nodeId, int voteTimeout, int writeTimeout, int electionGlobalTimeout, int numberOfNodes) Create the Props for the Node class.voidSend a message to a destination actor with a random delay, within 0 and 29 milliseconds.Methods inherited from class akka.actor.AbstractActorakka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, emptyBehavior, getContext, getSelf, getSender, postRestart, postStop, preRestart, preRestart, preStart, receive, receiveBuilder, self, supervisorStrategyMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface akka.actor.ActoraroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, sender, unhandled
- 
Constructor Details- 
Nodepublic Node(akka.actor.ActorRef coordinator, int nodeId, int voteTimeout, int writeTimeout, int electionGlobalTimeout, int numberOfNodes) Constructor for the Node class.- Parameters:
- coordinator- the coordinator ActorRef
- nodeId- the node ID
- voteTimeout- the vote timeout
- writeTimeout- the write timeout
- electionGlobalTimeout- the global election timeout
- numberOfNodes- the number of nodes in the network
 
 
- 
- 
Method Details- 
propspublic static akka.actor.Props props(akka.actor.ActorRef coordinator, int nodeId, int voteTimeout, int writeTimeout, int electionGlobalTimeout, int numberOfNodes) Create the Props for the Node class.- Parameters:
- coordinator- the coordinator ActorRef
- nodeId- the node ID
- voteTimeout- the vote timeout
- writeTimeout- the write timeout
- electionGlobalTimeout- the global election timeout
- numberOfNodes- the number of nodes in the network
- Returns:
- the Props object
 
- 
tellSend a message to a destination actor with a random delay, within 0 and 29 milliseconds.- Parameters:
- dest- the destination actor
- msg- the message to send
- sender- the sender actor
 
- 
createReceivepublic akka.actor.AbstractActor.Receive createReceive()Mask for to the Receiver actor.- Specified by:
- createReceivein class- akka.actor.AbstractActor
- Returns:
- the Receive object
 
 
-