public class SetupLocks extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SetupLocks.Lock |
Constructor and Description |
---|
SetupLocks() |
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSet(SetupLocks.Lock lock,
boolean expect,
boolean update)
Atomically sets the value to the given updated value
if the current value
== the expected value. |
void |
set(SetupLocks.Lock lock,
boolean newValue)
Unconditionally sets to the given value.
|
public boolean compareAndSet(SetupLocks.Lock lock, boolean expect, boolean update)
==
the expected value.lock
- the enum representing the lock to compare and setexpect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that
the actual value was not equal to the expected value.public void set(SetupLocks.Lock lock, boolean newValue)
lock
- the enum representing the lock to setnewValue
- the new valueCopyright © 2003–2017 Atlassian. All rights reserved.