Package akka.remote.artery
Class RestartCounter
- java.lang.Object
-
- akka.remote.artery.RestartCounter
-
public class RestartCounter extends java.lang.Object
INTERNAL API: Thread safe "restarts with duration" counter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RestartCounter.State
static class
RestartCounter.State$
-
Constructor Summary
Constructors Constructor Description RestartCounter(int maxRestarts, scala.concurrent.duration.FiniteDuration restartTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count()
Current number of restarts.boolean
restart()
Increment the restart counter, or reset the counter to 1 if therestartTimeout
has elapsed.
-
-
-
Method Detail
-
count
public int count()
Current number of restarts.
-
restart
public final boolean restart()
Increment the restart counter, or reset the counter to 1 if therestartTimeout
has elapsed. The latter also resets the timeout.- Returns:
true
if number of restarts, including this one, is less than or equal tomaxRestarts
-
-