|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.core.ScopedExclusionServiceHelper
public class ScopedExclusionServiceHelper
Provides helper methods that provide higher level of abstraction over object locked by $ScopedExclusionService
.
Method Summary | ||
---|---|---|
static
|
adapt(java.util.concurrent.Callable<S> callable)
Adapts the supplied parameter to $ ScopedExclusionService.ExclusiveFunction |
|
static
|
adapt(com.google.common.base.Function<S,V> function)
Adapts the supplied parameter to $ ScopedExclusionService.ExclusiveFunction |
|
static
|
adapt(java.lang.Runnable runnable)
Adapts the supplied parameter to $ ScopedExclusionService.ExclusiveFunction |
|
static
|
adapt(com.google.common.base.Supplier<V> supplier)
Adapts the supplied parameter to $ ScopedExclusionService.ExclusiveFunction |
|
static
|
adapt(com.atlassian.util.concurrent.Supplier<V> supplier)
Adapts the supplied parameter to $ ScopedExclusionService.ExclusiveFunction |
|
static
|
clearSession(ScopedExclusionService.ExclusiveFunction<S,V,java.lang.RuntimeException> function)
Delegates a call to the supplied function, first flushing and clearing the Hibernate session. |
|
static
|
withLockedJob(ScopedExclusionService exclusionService,
PlanKey planKey,
ScopedExclusionService.ExclusiveFunction<PlanKey,V,E> functor)
Executes the function while holding an exclusive lock on planKey interpreted as job key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <V,E extends java.lang.Throwable> V withLockedJob(ScopedExclusionService exclusionService, PlanKey planKey, ScopedExclusionService.ExclusiveFunction<PlanKey,V,E> functor) throws E extends java.lang.Throwable
exclusionService
- planKey
- functor
-
E extends java.lang.Throwable
public static <S,V> ScopedExclusionService.ExclusiveFunction<S,V,java.lang.RuntimeException> clearSession(ScopedExclusionService.ExclusiveFunction<S,V,java.lang.RuntimeException> function)
public static <S,V> ScopedExclusionService.ExclusiveFunction<S,V,java.lang.RuntimeException> adapt(com.google.common.base.Function<S,V> function)
ScopedExclusionService.ExclusiveFunction
public static <S,V> ScopedExclusionService.ExclusiveFunction<S,V,java.lang.RuntimeException> adapt(com.google.common.base.Supplier<V> supplier)
ScopedExclusionService.ExclusiveFunction
public static <S,V> ScopedExclusionService.ExclusiveFunction<S,V,java.lang.RuntimeException> adapt(com.atlassian.util.concurrent.Supplier<V> supplier)
ScopedExclusionService.ExclusiveFunction
public static <S> ScopedExclusionService.ExclusiveFunction<S,java.lang.Void,java.lang.RuntimeException> adapt(java.lang.Runnable runnable)
ScopedExclusionService.ExclusiveFunction
public static <S> ScopedExclusionService.ExclusiveFunction<S,java.lang.Void,java.lang.Exception> adapt(java.util.concurrent.Callable<S> callable)
ScopedExclusionService.ExclusiveFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |