Package com.atlassian.bamboo.concurrent
Class CoalescingBlockedCallsReference<T>
- java.lang.Object
-
- com.atlassian.bamboo.concurrent.CoalescingBlockedCallsReference<T>
-
public class CoalescingBlockedCallsReference<T> extends Object
get() on this reference has the following properties: When a call (call A) to get is made and is in progress, any get() call done while the call A is still pending will block the new call until call A is finished. After is finished, a get() will be called once and all threads that used to be blocked will get the same return value from get(). If there's no call in progress, this reference works just like a regular supplier.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
static CoalescingBlockedCallsReference<Void>
make(Runnable runnable)
static <T> CoalescingBlockedCallsReference<T>
make(Supplier<T> supplier)
-
-
-
Method Detail
-
get
public T get() throws ExecutionException, InterruptedException
-
make
public static <T> CoalescingBlockedCallsReference<T> make(Supplier<T> supplier)
-
make
public static CoalescingBlockedCallsReference<Void> make(Runnable runnable)
-
-