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 aTask
by anExecutor
is 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 Duration
m_duration
The minimum duration to yield.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Task.Yield
atLeast(Duration duration)
Constructs aTask.Yield
for the specified duration.boolean
equals(Object object)
Duration
getDuration()
Obtains theDuration
for theTask.Yield
.int
hashCode()
-
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 theDuration
for theTask.Yield
.- Returns:
- the
Duration
-
atLeast
public static Task.Yield atLeast(Duration duration)
Constructs aTask.Yield
for the specified duration.- Parameters:
duration
- theDuration
- Returns:
- a
Task.Yield
-
-