Package bftsmart.tom.leaderchange
Class RequestsTimer
- java.lang.Object
-
- bftsmart.tom.leaderchange.RequestsTimer
-
public class RequestsTimer extends java.lang.ObjectThis thread serves as a manager for all timers of pending requests.
-
-
Constructor Summary
Constructors Constructor Description RequestsTimer(TOMLayer tomLayer, ServerCommunicationSystem communication, ServerViewController controller)Creates a new instance of RequestsTimer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearAll()Cancels all timers for all messagesvoidEnabled(boolean phase)java.util.Set<java.lang.Integer>getTimers()booleanisEnabled()voidrun_lc_protocol()voidsetShortTimeout(long shortTimeout)voidsetSTOP(int regency, LCMessage stop)voidshutdown()voidstartTimer()voidstopAllSTOPs()voidstopSTOP(int regency)voidstopTimer()voidunwatch(TOMMessage request)Cancels a timer for a given requestvoidwatch(TOMMessage request)Creates a timer for the given request
-
-
-
Constructor Detail
-
RequestsTimer
public RequestsTimer(TOMLayer tomLayer, ServerCommunicationSystem communication, ServerViewController controller)
Creates a new instance of RequestsTimer- Parameters:
tomLayer- TOM layer
-
-
Method Detail
-
setShortTimeout
public void setShortTimeout(long shortTimeout)
-
startTimer
public void startTimer()
-
stopTimer
public void stopTimer()
-
Enabled
public void Enabled(boolean phase)
-
isEnabled
public boolean isEnabled()
-
watch
public void watch(TOMMessage request)
Creates a timer for the given request- Parameters:
request- Request to which the timer is being createf for
-
unwatch
public void unwatch(TOMMessage request)
Cancels a timer for a given request- Parameters:
request- Request whose timer is to be canceled
-
clearAll
public void clearAll()
Cancels all timers for all messages
-
run_lc_protocol
public void run_lc_protocol()
-
setSTOP
public void setSTOP(int regency, LCMessage stop)
-
stopAllSTOPs
public void stopAllSTOPs()
-
stopSTOP
public void stopSTOP(int regency)
-
getTimers
public java.util.Set<java.lang.Integer> getTimers()
-
shutdown
public void shutdown()
-
-