|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ILockManager
The lock manager manages locks across all threads and JVMs and cluster members. It also manages shared data, which is not necessarily atomic and should be protected by locks.
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
| Method Summary | |
|---|---|
boolean |
checkGlobalFlag(java.lang.String flagName)
Check the condition of a specified flag. |
void |
clearGlobalFlag(java.lang.String flagName)
Clear a flag. |
void |
clearLocks()
Clear all outstanding locks in the system. |
void |
enterCriticalSections(java.lang.String[] readSectionKeys,
java.lang.String[] nonExSectionKeys,
java.lang.String[] writeSectionKeys)
Enter multiple critical sections simultaneously. |
void |
enterLocks(java.lang.String[] readLocks,
java.lang.String[] nonExWriteLocks,
java.lang.String[] writeLocks)
Enter multiple locks simultaneously. |
void |
enterLocksNoWait(java.lang.String[] readLocks,
java.lang.String[] nonExWriteLocks,
java.lang.String[] writeLocks)
Enter multiple locks simultaneously. |
void |
enterNonExWriteCriticalSection(java.lang.String sectionKey)
Enter a named, non-exclusive write critical section (NOT a lock). |
void |
enterNonExWriteLock(java.lang.String lockKey)
Enter a non-exclusive write-locked area (blocking out all readers, but letting in other "writers"). |
void |
enterNonExWriteLockNoWait(java.lang.String lockKey)
Enter a non-exclusive write-locked area (blocking out all readers, but letting in other "writers"). |
void |
enterReadCriticalSection(java.lang.String sectionKey)
Enter a named, read critical section (NOT a lock). |
void |
enterReadLock(java.lang.String lockKey)
Enter a read-only locked area (i.e., block ONLY if there's a writer). |
void |
enterReadLockNoWait(java.lang.String lockKey)
Enter a read-only locked area (i.e., block ONLY if there's a writer). |
void |
enterWriteCriticalSection(java.lang.String sectionKey)
Enter a named, exclusive write critical section (NOT a lock). |
void |
enterWriteLock(java.lang.String lockKey)
Enter a write locked code area (i.e., block out both readers and other writers). |
void |
enterWriteLockNoWait(java.lang.String lockKey)
Enter a write locked code area (i.e., block out both readers and other writers), but do not wait if the lock cannot be obtained. |
void |
leaveCriticalSections(java.lang.String[] readSectionKeys,
java.lang.String[] nonExSectionKeys,
java.lang.String[] writeSectionKeys)
Leave multiple critical sections simultaneously. |
void |
leaveLocks(java.lang.String[] readLocks,
java.lang.String[] nonExWriteLocks,
java.lang.String[] writeLocks)
Leave multiple locks. |
void |
leaveNonExWriteCriticalSection(java.lang.String sectionKey)
Leave a named, non-exclusive write critical section (NOT a lock). |
void |
leaveNonExWriteLock(java.lang.String lockKey)
Leave a non-exclusive write locked code area. |
void |
leaveReadCriticalSection(java.lang.String sectionKey)
Leave a named, read critical section (NOT a lock). |
void |
leaveReadLock(java.lang.String lockKey)
Leave a read-locked code area. |
void |
leaveWriteCriticalSection(java.lang.String sectionKey)
Leave a named, exclusive write critical section (NOT a lock). |
void |
leaveWriteLock(java.lang.String lockKey)
Leave a write locked code area. |
byte[] |
readData(java.lang.String resourceName)
Read data from a shared data resource. |
void |
setGlobalFlag(java.lang.String flagName)
Raise a flag. |
void |
timedWait(int time)
Wait for a time before retrying a lock. |
void |
writeData(java.lang.String resourceName,
byte[] data)
Write data to a shared data resource. |
| Field Detail |
|---|
static final java.lang.String _rcsid
| Method Detail |
|---|
void setGlobalFlag(java.lang.String flagName)
throws ManifoldCFException
flagName - is the name of the flag to set.
ManifoldCFException
void clearGlobalFlag(java.lang.String flagName)
throws ManifoldCFException
flagName - is the name of the flag to clear.
ManifoldCFException
boolean checkGlobalFlag(java.lang.String flagName)
throws ManifoldCFException
flagName - is the name of the flag to check.
ManifoldCFException
byte[] readData(java.lang.String resourceName)
throws ManifoldCFException
resourceName - is the global name of the resource.
ManifoldCFException
void writeData(java.lang.String resourceName,
byte[] data)
throws ManifoldCFException
resourceName - is the global name of the resource.data - is the byte array containing the data. Pass null if you want to delete the resource completely.
ManifoldCFException
void timedWait(int time)
throws ManifoldCFException
time - is the amount of time to wait, in milliseconds. Zero is a legal
value, and will wait no time, but will give up the current timeslice to another
thread.
ManifoldCFException
void enterWriteLock(java.lang.String lockKey)
throws ManifoldCFException
lockKey - is the name of the lock.
ManifoldCFException
void enterWriteLockNoWait(java.lang.String lockKey)
throws ManifoldCFException,
LockException
lockKey - is the name of the lock.
ManifoldCFException
LockException
void leaveWriteLock(java.lang.String lockKey)
throws ManifoldCFException
lockKey - is the name of the lock.
ManifoldCFException
void enterNonExWriteLock(java.lang.String lockKey)
throws ManifoldCFException
lockKey - is the name of the lock.
ManifoldCFException
void enterNonExWriteLockNoWait(java.lang.String lockKey)
throws ManifoldCFException,
LockException
lockKey - is the name of the lock.
ManifoldCFException
LockException
void leaveNonExWriteLock(java.lang.String lockKey)
throws ManifoldCFException
lockKey - is the name of the lock.
ManifoldCFException
void enterReadLock(java.lang.String lockKey)
throws ManifoldCFException
lockKey - is the name of the lock.
ManifoldCFException
void enterReadLockNoWait(java.lang.String lockKey)
throws ManifoldCFException,
LockException
lockKey - is the name of the lock.
ManifoldCFException
LockException
void leaveReadLock(java.lang.String lockKey)
throws ManifoldCFException
lockKey - is the name of the lock.
ManifoldCFException
void enterLocks(java.lang.String[] readLocks,
java.lang.String[] nonExWriteLocks,
java.lang.String[] writeLocks)
throws ManifoldCFException
readLocks - is an array of read lock names, or null if there are no read locks desired.nonExWriteLocks - is an array of non-ex write lock names, or null if none desired.writeLocks - is an array of write lock names, or null if there are none desired.
ManifoldCFException
void enterLocksNoWait(java.lang.String[] readLocks,
java.lang.String[] nonExWriteLocks,
java.lang.String[] writeLocks)
throws ManifoldCFException,
LockException
readLocks - is an array of read lock names, or null if there are no read locks desired.nonExWriteLocks - is an array of non-ex write lock names, or null if none desired.writeLocks - is an array of write lock names, or null if there are none desired.
ManifoldCFException
LockException
void leaveLocks(java.lang.String[] readLocks,
java.lang.String[] nonExWriteLocks,
java.lang.String[] writeLocks)
throws ManifoldCFException
readLocks - is an array of read lock names, or null if there are no read locks desired.nonExWriteLocks - is an array of non-ex write lock names, or null if none desired.writeLocks - is an array of write lock names, or null if there are none desired.
ManifoldCFException
void clearLocks()
throws ManifoldCFException
ManifoldCFException
void enterReadCriticalSection(java.lang.String sectionKey)
throws ManifoldCFException
sectionKey - is the name of the section to enter. Only one thread can be in any given named
section at a time.
ManifoldCFException
void leaveReadCriticalSection(java.lang.String sectionKey)
throws ManifoldCFException
sectionKey - is the name of the section to leave. Only one thread can be in any given named
section at a time.
ManifoldCFException
void enterNonExWriteCriticalSection(java.lang.String sectionKey)
throws ManifoldCFException
sectionKey - is the name of the section to enter. Only one thread can be in any given named
section at a time.
ManifoldCFException
void leaveNonExWriteCriticalSection(java.lang.String sectionKey)
throws ManifoldCFException
sectionKey - is the name of the section to leave. Only one thread can be in any given named
section at a time.
ManifoldCFException
void enterWriteCriticalSection(java.lang.String sectionKey)
throws ManifoldCFException
sectionKey - is the name of the section to enter. Only one thread can be in any given named
section at a time.
ManifoldCFException
void leaveWriteCriticalSection(java.lang.String sectionKey)
throws ManifoldCFException
sectionKey - is the name of the section to leave. Only one thread can be in any given named
section at a time.
ManifoldCFException
void enterCriticalSections(java.lang.String[] readSectionKeys,
java.lang.String[] nonExSectionKeys,
java.lang.String[] writeSectionKeys)
throws ManifoldCFException
readSectionKeys - is an array of read section descriptors, or null if there are no read sections desired.nonExSectionKeys - is an array of non-ex write section descriptors, or null if none desired.writeSectionKeys - is an array of write section descriptors, or null if there are none desired.
ManifoldCFException
void leaveCriticalSections(java.lang.String[] readSectionKeys,
java.lang.String[] nonExSectionKeys,
java.lang.String[] writeSectionKeys)
throws ManifoldCFException
readSectionKeys - is an array of read section descriptors, or null if there are no read sections desired.nonExSectionKeys - is an array of non-ex write section descriptors, or null if none desired.writeSectionKeys - is an array of write section descriptors, or null if there are none desired.
ManifoldCFException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||