xflminterface IF_LockInfoClient : public XF_RefCount
This class represents the lock information client interface. It extends XF_RefCount. XFLAIM does not provide an implementation of this interface. An application must implement this interface and pass an object of this type into the IF_Db::getLockWaiters method. The getLockWaiters method will call methods on this object to report the number of lock waiters and information on each of them.
Method Summary |
|
FLMBOOL |
setLockCount - Reports number of threads currently holding the database lock plus the number waiting to obtain the database lock |
FLMBOOL |
addLockInfo - Report each lock holder or lock waiter. |
Method Detail |
FLMBOOL setLockCount(
FLMUINT uiTotalLocks);
This method is called by getLockWaiters to report the total number of threads that are holding the database lock (one at most) plus the number of threads that are waiting to obtain the database lock. The implementer of this method should return TRUE if getLockWaiters should continue, FALSE otherwise. After this method is called, addLockInfo will be called for each lock holder and lock waiter.
Parameters In:
FLMUINT uiTotalLocks This is the total number of threads hold the database lock (one at most) plus the total number of threads waiting to obtain the database lock. A zero means there are no lock holders or waiters. Since there can only ever be one lock holder, and there will never be lock waiters unless there is a lock holder, a non-zero number N can be interpreted to be 1 lock holder and N-1 lock waiters.
Parameters Out: none.
See Also:
FLMBOOL addLockInfo(
FLMUINT uiLockNum,
FLMUINT uiThreadID,
FLMUINT uiTime);
This method is called by getLockWaiters to report each lock holder or lock waiter. The first time it is called, it will be reporting the lock holder (there can only ever be one). All subsequent calls will be to report lock waiters. The implementer of this method should return TRUE if getLockWaiters should continue, FALSE otherwise.
Parameters In:
FLMUINT uiLockNum This reports which lock holder or waiter is being reported. A zero indicates that it is the lock holder. All other positive numbers indicate the nth lock waiter. FLMUINT uiThreadID Thread ID of the lock holder or waiter. FLMUINT uiTime For the lock holder, this is the number of milliseconds he has been holding onto the database lock. For lock waiters, it is the number of milliseconds they have been waiting to obtain the database lock.
Parameters Out: none.