01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.lockmanager.api;
05:
06: import com.tc.object.tx.WaitInvocation;
07:
08: public interface ThreadLockManager {
09:
10: public LockID lockIDFor(String lockName);
11:
12: public void lock(LockID lockID, int lockLevel);
13:
14: public boolean tryLock(LockID lockID, WaitInvocation timeout,
15: int lockLevel);
16:
17: public void wait(LockID lockID, WaitInvocation call, Object object,
18: WaitListener waitListener) throws InterruptedException;
19:
20: public Notify notify(LockID lockID, boolean all);
21:
22: public void unlock(LockID lockID);
23:
24: public boolean isLocked(LockID lockID, int lockLevel);
25:
26: public int localHeldCount(LockID lockID, int lockLevel);
27:
28: public int queueLength(LockID lockId);
29:
30: public int waitLength(LockID lockId);
31: }
|