public class LockMRSW extends Object implements Lock
Constructor and Description |
---|
LockMRSW() |
Modifier and Type | Method and Description |
---|---|
void |
enterCriticalSection(boolean readLockRequested)
Application controlled locking - enter a critical section.
|
void |
leaveCriticalSection()
Application controlled locking - leave a critical section.
|
public final void enterCriticalSection(boolean readLockRequested)
try { enterCriticalSection(Lock.READ) ; ... application code ... } finally { leaveCriticalSection() ; }
enterCriticalSection
in interface Lock
readLockRequested
- true implies a read lock, false implies write lock.Lock.leaveCriticalSection()
public final void leaveCriticalSection()
leaveCriticalSection
in interface Lock
enterCriticalSection(boolean)
Licenced under the Apache License, Version 2.0