1 23 24 package org.apache.commons.transaction.locking; 25 26 import java.util.Set ; 27 28 40 public interface LockManager2 { 41 42 55 public boolean hasLock(Object ownerId, Object resourceId, int lockLevel); 56 57 75 public boolean checkLock(Object ownerId, Object resourceId, int targetLockLevel, boolean reentrant); 76 77 96 public boolean tryLock(Object ownerId, Object resourceId, int targetLockLevel, boolean reentrant); 97 98 118 public void lock(Object ownerId, Object resourceId, int targetLockLevel, boolean reentrant) 119 throws LockException; 120 121 143 public void lock(Object ownerId, Object resourceId, int targetLockLevel, boolean reentrant, 144 long timeoutMSecs) throws LockException; 145 146 178 public void lock(Object ownerId, Object resourceId, int targetLockLevel, int compatibility, 179 boolean preferred, long timeoutMSecs) throws LockException; 180 181 193 public void startGlobalTimeout(Object ownerId, long timeoutMSecs); 194 195 201 public int getLevel(Object ownerId, Object resourceId); 202 203 211 public boolean release(Object ownerId, Object resourceId); 212 213 218 public void releaseAll(Object ownerId); 219 220 226 public Set getAll(Object ownerId); 227 228 229 236 public MultiLevelLock getLock(Object resourceId); 237 238 246 public void removeLock(MultiLevelLock lock); 247 248 } 249 | Popular Tags |