Package com.atlassian.bamboo.utils
Class BambooRunnables
- java.lang.Object
-
- com.atlassian.bamboo.utils.BambooRunnables
-
public class BambooRunnables extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BambooRunnables.BambooRunnableFromCallable<V>
static interface
BambooRunnables.NotThrowing
static class
BambooRunnables.RunnableFromCallable<V>
static interface
BambooRunnables.Throwing<E1 extends Throwable>
static interface
BambooRunnables.Throwing1<E1 extends Throwable>
static interface
BambooRunnables.Throwing2<E1 extends Throwable,E2 extends Throwable>
static interface
BambooRunnables.ThrowingX<E1 extends Throwable,E2 extends Throwable,E3 extends Throwable>
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> BambooRunnables.BambooRunnableFromCallable<V>
asBambooRunnable(Callable<V> callable)
static <V> BambooRunnables.RunnableFromCallable<V>
asJavaRunnable(Callable<V> callable)
static BambooRunnables.NotThrowing
from(Runnable runnable)
static Runnable
runOnce(Runnable code)
Will run runnable only once.static void
runUnchecked(BambooRunnables.ThrowingX<? extends Exception,? extends Exception,? extends Exception> throwingRunnable)
-
-
-
Method Detail
-
asJavaRunnable
public static <V> BambooRunnables.RunnableFromCallable<V> asJavaRunnable(Callable<V> callable)
-
asBambooRunnable
public static <V> BambooRunnables.BambooRunnableFromCallable<V> asBambooRunnable(Callable<V> callable)
-
from
public static BambooRunnables.NotThrowing from(Runnable runnable)
-
runOnce
public static Runnable runOnce(Runnable code)
Will run runnable only once. Next calls to run will run nothing.- Parameters:
code
-- Returns:
-
runUnchecked
public static void runUnchecked(BambooRunnables.ThrowingX<? extends Exception,? extends Exception,? extends Exception> throwingRunnable)
-
-