Package org.wildfly.security.auth.realm
Class IdentitySharedExclusiveLock.IdentityLock
- java.lang.Object
-
- org.wildfly.security.auth.realm.IdentitySharedExclusiveLock.IdentityLock
-
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- IdentitySharedExclusiveLock
public class IdentitySharedExclusiveLock.IdentityLock extends Object implements AutoCloseable
Class that represents a lock on a realm identity. A lock object is created each time a lock is acquired on a realm identity viaIdentitySharedExclusiveLock.lockExclusive()orIdentitySharedExclusiveLock.lockShared().
-
-
Constructor Summary
Constructors Constructor Description IdentityLock(boolean exclusive)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisExclusive()Determine whether this lock is exclusive or shared.booleanisValid()Determine whether this lock is valid.voidrelease()Release this lock.
-
-
-
Method Detail
-
release
public void release()
Release this lock. Invoking this method has no effect if this lock is invalid.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
isExclusive
public boolean isExclusive()
Determine whether this lock is exclusive or shared.- Returns:
trueif this lock is exclusive,falseif this lock is shared
-
-