Package com.atlassian.bamboo.util
Class AcquisitionPolicy
- java.lang.Object
-
- com.atlassian.bamboo.util.AcquisitionPolicy
-
-
Field Summary
Fields Modifier and Type Field Description static AcquisitionPolicy
IMMEDIATE
Attempts to acquire the lock immediately.static AcquisitionPolicy
WAIT
Waits until theLock
has been acquired
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
acquire(@NotNull Lock lock)
Acquires the lock according to the implementation requirements
-
-
-
Field Detail
-
IMMEDIATE
public static final AcquisitionPolicy IMMEDIATE
Attempts to acquire the lock immediately.
-
WAIT
public static final AcquisitionPolicy WAIT
Waits until theLock
has been acquired
-
-
Method Detail
-
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
-
-