1 package org.apache.ojb.broker.locking; 2 3 17 18 19 40 public interface LockManager extends IsolationLevels 41 { 42 45 public final static long DEFAULT_LOCK_TIMEOUT = 60000; 46 47 50 public final static long DEFAULT_BLOCK_TIMEOUT = 1000; 51 52 57 public long getBlockTimeout(); 58 59 65 public void setBlockTimeout(long timeout); 66 67 71 public long getLockTimeout(); 72 73 79 public void setLockTimeout(long timeout); 80 81 85 public String getLockInfo(); 86 87 96 public boolean readLock(Object key, Object resourceId, int isolationLevel); 97 98 107 public boolean writeLock(Object key, Object resourceId, int isolationLevel); 108 109 118 public boolean upgradeLock(Object key, Object resourceId, int isolationLevel); 119 120 128 public boolean releaseLock(Object key, Object resourceId); 129 130 135 public void releaseLocks(Object key); 136 137 145 public boolean hasRead(Object key, Object resourceId); 146 147 155 public boolean hasWrite(Object key, Object resourceId); 156 157 165 public boolean hasUpgrade(Object key, Object resourceId); 166 } 167 | Popular Tags |