Class Task.Yield
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.oracle.coherence.concurrent.executor.Task.Yield
-
- All Implemented Interfaces:
Serializable
public static class Task.Yield extends Exception
An exception signalling the execution of aTaskby anExecutoris to be suspended and resumed at some later point in time, typically by the sameExecutor.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Durationm_durationThe minimum duration to yield.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Task.YieldatLeast(Duration duration)Constructs aTask.Yieldfor the specified duration.booleanequals(Object object)DurationgetDuration()Obtains theDurationfor theTask.Yield.inthashCode()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
m_duration
protected final Duration m_duration
The minimum duration to yield.
-
-
Method Detail
-
getDuration
public Duration getDuration()
Obtains theDurationfor theTask.Yield.- Returns:
- the
Duration
-
atLeast
public static Task.Yield atLeast(Duration duration)
Constructs aTask.Yieldfor the specified duration.- Parameters:
duration- theDuration- Returns:
- a
Task.Yield
-
-