public static interface TcpTimeouts.Waiter
The total wait time starts at 0 and is incremented by each call to getTimeForSleep or sleepTime. Once the total wait time exceeds the maximum total wait time, isExpired returns true.
The timer also has a current wait time, which is returned by getTime and is the interval for which sleep waits. The initial value of the current wait time is get_initial_time_to_wait(). Each subsequent call to advance increases the current wait time by a factor of (previous*get_backoff_factor())/100, unless get_max_single_wait_time is configured and the current wait time exceeds get_max_single_wait_time(). If get_max_single_wait_time() is not used, the current time increases without bound (until it overflows). Once get_max_single_wait_time() is reached, every subsequent call to next() returnes get_max_single_wait_time(), and advance has no effect.
| Modifier and Type | Method and Description |
|---|---|
void |
advance()
Advance to the next timeout value.
|
int |
getTime()
Return the current timeout value,
but do not increment total wait time.
|
int |
getTimeForSleep()
Return the current timeout value.
|
boolean |
isExpired()
Returns true if the waiter has expired.
|
void |
reset()
Set the current timeout back to the initial
value.
|
boolean |
sleepTime()
Sleep for the current timeout value.
|
int |
timeWaiting()
Return the accumulated wait time.
|
void advance()
void reset()
int getTimeForSleep()
int getTime()
int timeWaiting()
boolean sleepTime()
boolean isExpired()
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.