public abstract class TryRepeatedly<V>
extends com.google.common.util.concurrent.AbstractFuture<V>
ListenableFuture
that promises a value that needs to be periodically tried.
Specialized for use from Pickle.rehydrate(FlowExecutionOwner)
.Modifier | Constructor and Description |
---|---|
protected |
TryRepeatedly(int delay) |
protected |
TryRepeatedly(int delay,
int initialDelay) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
protected org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner |
getOwner()
Override to supply the owner passed to
Pickle.rehydrate(FlowExecutionOwner) . |
protected void |
printWaitingMessage(hudson.model.TaskListener listener)
Assuming
getOwner() has been overridden, override to print a message to the build log explaining why the pickle is still unloadable. |
protected abstract V |
tryResolve()
This method is called periodically to attempt to resolve the value that this future promises.
|
protected TryRepeatedly(int delay)
protected TryRepeatedly(int delay, int initialDelay)
@Nonnull protected org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner getOwner()
Pickle.rehydrate(FlowExecutionOwner)
.protected void printWaitingMessage(@Nonnull hudson.model.TaskListener listener)
getOwner()
has been overridden, override to print a message to the build log explaining why the pickle is still unloadable.
Could use ModelHyperlinkNote
etc.public boolean cancel(boolean mayInterruptIfRunning)
@CheckForNull protected abstract V tryResolve() throws Exception
Exception
- Any exception thrown will cause the future to fail.Copyright © 2016–2017. All rights reserved.