com.atlassian.bamboo.plan
Interface PlanExecutionLockService

All Known Implementing Classes:
PlanExecutionLockServiceImpl

public interface PlanExecutionLockService

Locking manager for PlanExecutionManager


Method Summary
 void interruptLockOwner(PlanKey planKey)
          Interrupts the owner of the lock represented by PlanKey
 boolean isLocked(PlanKey planKey)
          Checks if the given PlanKey has been locked
<V> V
lock(PlanKey planKey, AcquisitionPolicy acquisitionPolicy, java.util.concurrent.Callable<V> callable)
          Acquires a lock on the given PlanKey then calls the given Callable within the global request lock
<V> V
runWhenNoExecutionRequestsAreBeingMade(java.util.concurrent.Callable<V> callable)
          Executes the given Callable when there are no requests being made to execute plans
 

Method Detail

runWhenNoExecutionRequestsAreBeingMade

<V> V runWhenNoExecutionRequestsAreBeingMade(@NotNull
                                             java.util.concurrent.Callable<V> callable)
                                         throws java.lang.Exception
Executes the given Callable when there are no requests being made to execute plans

Type Parameters:
V - callable result type
Parameters:
callable - to execute
Returns:
callable result
Throws:
java.lang.Exception - if error

isLocked

boolean isLocked(@NotNull
                 PlanKey planKey)
Checks if the given PlanKey has been locked

Parameters:
planKey - to check
Returns:
locked state

lock

<V> V lock(@NotNull
           PlanKey planKey,
           @NotNull
           AcquisitionPolicy acquisitionPolicy,
           @NotNull
           java.util.concurrent.Callable<V> callable)
       throws java.lang.Exception
Acquires a lock on the given PlanKey then calls the given Callable within the global request lock

Type Parameters:
V - callable result type
Parameters:
planKey - to lock
acquisitionPolicy - to acquire the lock
callable - to execute
Returns:
callable result
Throws:
java.lang.Exception - if error

interruptLockOwner

void interruptLockOwner(@NotNull
                        PlanKey planKey)
Interrupts the owner of the lock represented by PlanKey

Parameters:
planKey -
Since:
3.3.3


Copyright © 2012 Atlassian. All Rights Reserved.