1 4 package com.tc.object.lockmanager.api; 5 6 import com.tc.object.lockmanager.impl.GlobalLockInfo; 7 import com.tc.object.session.SessionID; 8 import com.tc.object.tx.WaitInvocation; 9 10 import java.util.Collection ; 11 12 17 public interface ClientLockManager { 18 19 public void pause(); 20 21 public void starting(); 22 23 public void unpause(); 24 25 public boolean isStarting(); 26 27 32 public void lock(LockID id, ThreadID threadID, int type); 33 34 public boolean tryLock(LockID id, ThreadID threadID, int type); 35 36 41 public void unlock(LockID id, ThreadID threadID); 42 43 46 public void awardLock(SessionID sessionID, LockID id, ThreadID threadID, int type); 47 48 public void cannotAwardLock(SessionID sessionID, LockID id, ThreadID threadID, int type); 49 50 public LockID lockIDFor(String id); 51 52 public void wait(LockID lockID, ThreadID threadID, WaitInvocation call, Object waitObject, WaitListener listener) throws InterruptedException ; 53 54 public void waitTimedOut(LockID lockID, ThreadID threadID); 55 56 60 public Notify notify(LockID lockID, ThreadID threadID, boolean all); 61 62 65 public void notified(LockID lockID, ThreadID threadID); 66 67 70 public void recall(LockID lockID, ThreadID threadID, int level); 71 72 77 public Collection addAllWaitersTo(Collection c); 78 79 82 public Collection addAllHeldLocksTo(Collection c); 83 84 87 public Collection addAllPendingLockRequestsTo(Collection c); 88 89 public void runGC(); 90 91 public int queueLength(LockID lockID, ThreadID threadID); 92 93 public int waitLength(LockID lockID, ThreadID threadID); 94 95 public int localHeldCount(LockID lockID, int lockLevel, ThreadID threadID); 96 97 public boolean isLocked(LockID lockID, ThreadID threadID); 98 99 public void queryLockCommit(ThreadID threadID, GlobalLockInfo globalLockInfo); 100 } 101 | Popular Tags |