|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl
public class PlanExecutionLockServiceImpl
Constructor Summary | |
---|---|
PlanExecutionLockServiceImpl()
|
Method Summary | ||
---|---|---|
|
inlineProcessLocks(TriggerableInternalKey internalKey,
AcquisitionPolicy acquisitionPolicy,
java.util.concurrent.Callable<V> callable)
A parallel locking mechanism that allows a backdoor to the standard lock. |
|
void |
interruptLockOwner(TriggerableInternalKey internalKey)
Interrupts the owner of the lock represented by TriggerableInternalKey |
|
boolean |
isLocked(TriggerableInternalKey internalKey)
Checks if the given String has been locked |
|
|
lock(TriggerableInternalKey internalKey,
AcquisitionPolicy acquisitionPolicy,
java.util.concurrent.Callable<V> callable)
Quick note about the implementation Since the acquisition policy AcquisitionPolicy.WAIT can block for an indefinite amount of time
we acquire this lock before trying to take the global execution lock otherwise callers to runWhenNoExecutionRequestsAreBeingMade(Callable)
in the worst case will wait indefinitely. |
|
|
runWhenNoExecutionRequestsAreBeingMade(java.util.concurrent.Callable<V> callable)
Executes the given Callable when there are no requests being made to execute plans |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlanExecutionLockServiceImpl()
Method Detail |
---|
public <V> V runWhenNoExecutionRequestsAreBeingMade(@NotNull java.util.concurrent.Callable<V> callable) throws java.lang.Exception
PlanExecutionLockService
Callable
when there are no requests being made to execute plans
runWhenNoExecutionRequestsAreBeingMade
in interface PlanExecutionLockService
V
- callable result typecallable
- to execute
java.lang.Exception
- if errorpublic boolean isLocked(@NotNull TriggerableInternalKey internalKey)
PlanExecutionLockService
String
has been locked
isLocked
in interface PlanExecutionLockService
internalKey
- to check
public <V> V lock(@NotNull TriggerableInternalKey internalKey, @NotNull AcquisitionPolicy acquisitionPolicy, @NotNull java.util.concurrent.Callable<V> callable) throws java.lang.Exception
AcquisitionPolicy.WAIT
can block for an indefinite amount of time
we acquire this lock before trying to take the global execution lock otherwise callers to runWhenNoExecutionRequestsAreBeingMade(Callable)
in the worst case will wait indefinitely.
lock
in interface PlanExecutionLockService
V
- callable result typeinternalKey
- to lockacquisitionPolicy
- to acquire the lockcallable
- to execute
java.lang.Exception
- if errorpublic <V> V inlineProcessLocks(@NotNull TriggerableInternalKey internalKey, @NotNull AcquisitionPolicy acquisitionPolicy, @NotNull java.util.concurrent.Callable<V> callable) throws java.lang.Exception
PlanExecutionLockService
PlanExecutionLockService.isLocked(TriggerableInternalKey)
and PlanExecutionLockService.interruptLockOwner(TriggerableInternalKey)
inlineProcessLocks
in interface PlanExecutionLockService
java.lang.Exception
public void interruptLockOwner(@NotNull TriggerableInternalKey internalKey)
PlanExecutionLockService
TriggerableInternalKey
interruptLockOwner
in interface PlanExecutionLockService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |