Package bftsmart.tom.leaderchange
Class RequestsTimer
- java.lang.Object
-
- bftsmart.tom.leaderchange.RequestsTimer
-
public class RequestsTimer extends java.lang.Object
This 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 void
clearAll()
Cancels all timers for all messagesvoid
Enabled(boolean phase)
java.util.Set<java.lang.Integer>
getTimers()
boolean
isEnabled()
void
run_lc_protocol()
void
setShortTimeout(long shortTimeout)
void
setSTOP(int regency, LCMessage stop)
void
shutdown()
void
startTimer()
void
stopAllSTOPs()
void
stopSTOP(int regency)
void
stopTimer()
void
unwatch(TOMMessage request)
Cancels a timer for a given requestvoid
watch(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()
-
-