public class SyncContext extends Object implements EvalContext
EvalContext
that evaluates tasks immediately.
This context is not thread safe.
EvalContext.Promise<T>, EvalContext.Value<T>
LOG
Modifier and Type | Method and Description |
---|---|
static EvalContext |
create() |
<T> EvalContext.Promise<T> |
promise()
Create a promise for a value that can be fulfilled somewhere else.
|
<T> EvalContext.Value<T> |
value(Fn<T> value)
Create a
EvalContext.Value with semantics defined by this EvalContext |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
async, currentTask, evaluate, evaluateInternal, immediateValue, invokeProcessFn, listener, sync
public static EvalContext create()
public <T> EvalContext.Value<T> value(Fn<T> value)
EvalContext
EvalContext.Value
with semantics defined by this EvalContext
value
in interface EvalContext
T
- The type of the valuevalue
- A value value supplierpublic <T> EvalContext.Promise<T> promise()
EvalContext
promise
in interface EvalContext
T
- The type of the promised valueCopyright © 2020. All rights reserved.