Package org.wildfly.security.auth.realm
Class IdentitySharedExclusiveLock
- java.lang.Object
-
- org.wildfly.security.auth.realm.IdentitySharedExclusiveLock
-
public class IdentitySharedExclusiveLock extends Object
A simple shared/exclusive lock for a realm identity.- Author:
- Farah Juma
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
IdentitySharedExclusiveLock.IdentityLock
Class that represents a lock on a realm identity.
-
Field Summary
Fields Modifier and Type Field Description private int
exclusiveRequests
private boolean
isExclusiveLocked
private int
sharedHoldCount
-
Constructor Summary
Constructors Constructor Description IdentitySharedExclusiveLock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdentitySharedExclusiveLock.IdentityLock
lockExclusive()
Acquire the exclusive lock.IdentitySharedExclusiveLock.IdentityLock
lockShared()
Acquire a shared lock.private void
release(IdentitySharedExclusiveLock.IdentityLock identityLock)
-
-
-
Method Detail
-
lockExclusive
public IdentitySharedExclusiveLock.IdentityLock lockExclusive()
Acquire the exclusive lock. An invocation of this method will block until the lock can be acquired.- Returns:
- a lock object representing the newly acquired lock
-
lockShared
public IdentitySharedExclusiveLock.IdentityLock lockShared()
Acquire a shared lock. An invocation of this method will block until the lock can be acquired.- Returns:
- a lock object representing the newly acquired lock
-
release
private void release(IdentitySharedExclusiveLock.IdentityLock identityLock)
-
-