@GridToStringExclude public class GridSpinReadWriteLock extends Object
| Constructor and Description |
|---|
GridSpinReadWriteLock() |
| Modifier and Type | Method and Description |
|---|---|
void |
readLock()
Acquires read lock.
|
void |
readUnlock()
Read unlock.
|
String |
toString() |
boolean |
tryReadLock()
Tries to acquire read lock.
|
boolean |
tryWriteLock()
Tries to acquire write lock.
|
boolean |
tryWriteLock(long timeout,
TimeUnit unit) |
void |
writeLock()
Acquires write lock.
|
void |
writeLock0()
Acquires write lock without sleeping between unsuccessful attempts.
|
boolean |
writeLockedByCurrentThread() |
void |
writeUnlock()
Releases write lock.
|
public void readLock()
public boolean tryReadLock()
true if acquired.public void readUnlock()
public void writeLock()
public void writeLock0()
public boolean writeLockedByCurrentThread()
True if blocked by current thread.public boolean tryWriteLock()
True if write lock has been acquired.public boolean tryWriteLock(long timeout,
TimeUnit unit)
throws InterruptedException
timeout - Timeout.unit - Unit.True if write lock has been acquired.InterruptedException - If interrupted.public void writeUnlock()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021