public static final class NamedSimpleReentrantLock.Acquired extends NamedSimpleReentrantLock.AcquireResult
Modifier and Type | Method and Description |
---|---|
void |
close()
Revert the lock operation.
|
boolean |
wasAcquired()
Indication whether the lock operation succeeded, in which case this method returns true.
|
public boolean wasAcquired()
NamedSimpleReentrantLock.AcquireResult
wasAcquired
in class NamedSimpleReentrantLock.AcquireResult
public void close()
NamedSimpleReentrantLock.AcquireResult
NamedSimpleReentrantLock.AcquireResult.wasAcquired()
returns true, this method releases the underlying lock
in an idempotent way. If NamedSimpleReentrantLock.AcquireResult.wasAcquired()
returns false, this method does nothing.close
in interface AutoCloseable
close
in class NamedSimpleReentrantLock.AcquireResult
Copyright © 2020 OpenDaylight. All rights reserved.