public class StatementAgentInstanceLockRWLogging extends Object implements StatementAgentInstanceLock
ReentrantReadWriteLock
that associates a
name with the lock and logs read/write locking and unlocking.ACQUIRE_TEXT, ACQUIRED_TEXT, RELEASE_TEXT, RELEASED_TEXT
Constructor and Description |
---|
StatementAgentInstanceLockRWLogging(boolean isFair,
String statementName,
int cpid)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
acquireReadLock()
Lock read lock.
|
void |
acquireWriteLock()
Lock write lock.
|
boolean |
acquireWriteLock(long msecTimeout) |
void |
releaseReadLock()
Unlock read lock.
|
void |
releaseWriteLock()
Unlock write lock.
|
String |
toString() |
public StatementAgentInstanceLockRWLogging(boolean isFair, String statementName, int cpid)
isFair
- true if a fair lock, false if notstatementName
- statement namecpid
- context partition idpublic void acquireWriteLock()
acquireWriteLock
in interface StatementAgentInstanceLock
public boolean acquireWriteLock(long msecTimeout)
acquireWriteLock
in interface StatementAgentInstanceLock
public void releaseWriteLock()
releaseWriteLock
in interface StatementAgentInstanceLock
public void acquireReadLock()
acquireReadLock
in interface StatementAgentInstanceLock
public void releaseReadLock()
releaseReadLock
in interface StatementAgentInstanceLock
Copyright © 2005–2022. All rights reserved.