KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > lockmanager > api > ThreadLockManager


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.lockmanager.api;
5
6 import com.tc.object.tx.WaitInvocation;
7
8 public interface ThreadLockManager {
9
10   public LockID lockIDFor(String JavaDoc lockName);
11
12   public void lock(LockID lockID, int lockLevel);
13   
14   public boolean tryLock(LockID lockID, int lockLevel);
15
16   public void wait(LockID lockID, WaitInvocation call, Object JavaDoc object, WaitListener waitListener) throws InterruptedException JavaDoc;
17
18   public Notify notify(LockID lockID, boolean all);
19
20   public void unlock(LockID lockID);
21
22   public boolean isLocked(LockID lockID);
23   
24   public int localHeldCount(LockID lockID, int lockLevel);
25   
26   public int queueLength(LockID lockId);
27   
28   public int waitLength(LockID lockId);
29 }
30
Popular Tags