public interface

PlanExecutionLockService

com.atlassian.bamboo.plan.PlanExecutionLockService
Known Indirect Subclasses

Class Overview

Locking manager for PlanExecutionManager

Summary

Public Methods
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, Callable<V> callable)
Acquires a lock on the given PlanKey then calls the given Callable within the global request lock
<V> V runWhenNoExecutionRequestsAreBeingMade(Callable<V> callable)
Executes the given Callable when there are no requests being made to execute plans

Public Methods

public void interruptLockOwner (PlanKey planKey)

Interrupts the owner of the lock represented by PlanKey

public boolean isLocked (PlanKey planKey)

Checks if the given PlanKey has been locked

Parameters
planKey to check
Returns
  • locked state

public V lock (PlanKey planKey, AcquisitionPolicy acquisitionPolicy, Callable<V> callable)

Acquires a lock on the given PlanKey then calls the given Callable within the global request lock

Parameters
planKey to lock
acquisitionPolicy to acquire the lock
callable to execute
Returns
  • callable result
Throws
Exception if error

public V runWhenNoExecutionRequestsAreBeingMade (Callable<V> callable)

Executes the given Callable when there are no requests being made to execute plans

Parameters
callable to execute
Returns
  • callable result
Throws
Exception if error