Class ElectionState
java.lang.Object
org.tasktide.mutex.strategy.ElectionState
-
Constructor Summary
ConstructorsConstructorDescriptionElectionState(int pos, int lastPos, int streak, Path predecessor, Path leader) Construct election state -
Method Summary
Modifier and TypeMethodDescriptionintintgetPos()intvoidreset()Reset statevoidsetLastPos(int lastPos) voidvoidsetPos(int pos) voidsetPredecessor(Path predecessor) voidsetStreak(int streak) toString()Represent as string
-
Constructor Details
-
ElectionState
public ElectionState() -
ElectionState
-
-
Method Details
-
reset
public void reset()Reset state -
getPos
public int getPos() -
setPos
public void setPos(int pos) -
getLastPos
public int getLastPos() -
setLastPos
public void setLastPos(int lastPos) -
getStreak
public int getStreak() -
setStreak
public void setStreak(int streak) -
getPredecessor
-
setPredecessor
-
getLeader
-
setLeader
-
toString
-