com.atlassian.bamboo.util
Class AcquisitionPolicy

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

public abstract class AcquisitionPolicy
extends java.lang.Object

Policy for acquiring Locks


Field Summary
static AcquisitionPolicy IMMEDIATE
          Attempts to acquire the lock immediately.
static AcquisitionPolicy WAIT
          Waits until the Lock has been acquired
 
Method Summary
abstract  boolean acquire(java.util.concurrent.locks.Lock lock)
          Acquires the lock according to the implementation requirements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 Detail

acquire

public abstract boolean acquire(@NotNull
                                java.util.concurrent.locks.Lock lock)
Acquires the lock according to the implementation requirements

Parameters:
lock -
Returns:
true if the lock was acquired


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.