Class Timeout
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.support.concurrent.Timeout
-
- All Implemented Interfaces:
AutoCloseable
public class Timeout extends Object implements AutoCloseable
Allows operations to be limited in execution time. For example,VirtualChannel.call(hudson.remoting.Callable<V, T>)
orFilePath.isDirectory()
could otherwise hang forever. Use in atry
-with-resources block.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static Timeout
limit(long time, TimeUnit unit)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-