public interface Lock
Modifier and Type | Field and Description |
---|---|
static boolean |
READ
Descriptive name for lock requests - read lock
|
static boolean |
WRITE
Descriptive name for lock requests - write lock
|
Modifier and Type | Method and Description |
---|---|
void |
enterCriticalSection(boolean readLockRequested)
Enter a critical section.
|
void |
leaveCriticalSection()
Leave a critical section.
|
static final boolean READ
static final boolean WRITE
void enterCriticalSection(boolean readLockRequested)
readLockRequested
- true implies a read lock, false implies write lock.leaveCriticalSection()
void leaveCriticalSection()
enterCriticalSection(boolean)
Licenced under the Apache License, Version 2.0