-
public final class WatchdogLadderThe pure warn/degrade/recover/shutdown ladder with recovery hysteresis (below
recoverPctcontinuously forrecoverHoldMs, and only from warn/degrade — never from shutdown).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumWatchdogLadder.Actionpublic enumWatchdogLadder.State
-
Field Summary
Fields Modifier and Type Field Description private WatchdogLadder.Statestate
-
Method Summary
Modifier and Type Method Description final WatchdogLadder.StategetState()final UnitsetState(WatchdogLadder.State state)final WatchdogLadder.ActiononSample(Long usedBytes, Boolean lowMemory, Long now)Maps a memory sample to the raw action the ladder calls for, if any. final WatchdogLadder.Actiontransition(WatchdogLadder.Action action, Long now)Applies an action to the state machine; returns it only when it is a real transition. -
-
Method Detail
-
getState
final WatchdogLadder.State getState()
-
setState
final Unit setState(WatchdogLadder.State state)
-
onSample
final WatchdogLadder.Action onSample(Long usedBytes, Boolean lowMemory, Long now)
Maps a memory sample to the raw action the ladder calls for, if any.
-
transition
final WatchdogLadder.Action transition(WatchdogLadder.Action action, Long now)
Applies an action to the state machine; returns it only when it is a real transition.
-
-
-
-