|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.time.CountdownTimer
public class CountdownTimer
Method Summary | |
---|---|
Duration
|
getDurationElapsed()
return how long the timer has been running (longer than limit if isExpired()) |
Duration
|
getDurationRemaining()
returns how much time is left (negative if isExpired()) |
Duration
|
getLimit()
how much total time this timer should run for |
Stopwatch
|
getStopwatch()
returns underlying stopwatch, which caller can inspect for more details or modify |
boolean
|
isExpired()
true iff the timer has been running for the given time |
static CountdownTimer
|
newInstancePaused(Duration duration)
|
static CountdownTimer
|
newInstanceStarted(Duration duration)
|
CountdownTimer
|
pause()
pauses the timer, if running; no-op if not running |
CountdownTimer
|
start()
starts the timer, either initially or if pause()d; no-op if already running |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
public Duration getDurationElapsed()
public Duration getDurationRemaining()
public Duration getLimit()
public Stopwatch getStopwatch()
public boolean isExpired()
public static CountdownTimer newInstancePaused(Duration duration)
public static CountdownTimer newInstanceStarted(Duration duration)
public CountdownTimer pause()
public CountdownTimer start()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.