public class PersistingContext extends ForwardingEvalContext
EvalContext that serializes and persist tasks. Any call to EvalContext.evaluate(Task)
will persist the task and recurse to also do so for all input tasks. No task in the dependency
tree will actually be invoked. Instead EvalContext.evaluate(Task) will return a Value that
always fails.
After the returned Value has failed, all persisted file paths can be received through
getFiles().
EvalContext.Promise<T>, EvalContext.Value<T>delegate| Constructor and Description |
|---|
PersistingContext(Path basePath,
EvalContext delegate) |
| Modifier and Type | Method and Description |
|---|---|
static String |
cleanForFilename(TaskId taskId) |
static <T> T |
deserialize(Path filePath) |
<T> EvalContext.Value<T> |
evaluateInternal(Task<T> task,
EvalContext context) |
Map<TaskId,Path> |
getFiles() |
<T> EvalContext.Value<T> |
invokeProcessFn(TaskId taskId,
Fn<EvalContext.Value<T>> processFn) |
static void |
serialize(Object object,
Path file) |
immediateValue, promise, valueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasync, currentTask, evaluate, syncpublic PersistingContext(Path basePath, EvalContext delegate)
public <T> EvalContext.Value<T> evaluateInternal(Task<T> task, EvalContext context)
evaluateInternal in interface EvalContextevaluateInternal in class ForwardingEvalContextpublic <T> EvalContext.Value<T> invokeProcessFn(TaskId taskId, Fn<EvalContext.Value<T>> processFn)
invokeProcessFn in interface EvalContextinvokeProcessFn in class ForwardingEvalContextCopyright © 2018. All rights reserved.