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 void
close()
boolean
isExclusive()
Determine whether this lock is exclusive or shared.boolean
isValid()
Determine whether this lock is valid.void
release()
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:
close
in interfaceAutoCloseable
-
isExclusive
public boolean isExclusive()
Determine whether this lock is exclusive or shared.- Returns:
true
if this lock is exclusive,false
if this lock is shared
-
-