Class AcquisitionPolicy

java.lang.Object
com.atlassian.bamboo.util.AcquisitionPolicy

public abstract class AcquisitionPolicy extends Object
Policy for acquiring Locks
  • Field Details

    • IMMEDIATE

      public static final AcquisitionPolicy IMMEDIATE
      Attempts to acquire the lock immediately.
    • WAIT

      public static final AcquisitionPolicy WAIT
      Waits until the Lock has been acquired
  • Method Details

    • acquire

      public abstract boolean acquire(@NotNull @NotNull Lock lock)
      Acquires the lock according to the implementation requirements
      Parameters:
      lock -
      Returns:
      true if the lock was acquired