You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by oz...@apache.org on 2004/12/17 01:14:09 UTC
cvs commit: jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking LockManager.java
ozeigermann 2004/12/16 16:14:08
Modified: transaction/src/java/org/apache/commons/transaction/locking
LockManager.java
Log:
getLock is not deprecated, but actually very helpful
Revision Changes Path
1.3 +18 -22 jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/LockManager.java
Index: LockManager.java
===================================================================
RCS file: /home/cvs/jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/LockManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LockManager.java 14 Dec 2004 12:12:46 -0000 1.2
+++ LockManager.java 17 Dec 2004 00:14:08 -0000 1.3
@@ -139,29 +139,11 @@
/**
- * Either gets an existing lock on the specified resource or creates one if none exists.
- * This methods guarantees to do this atomically.
- *
- * @param resourceId the resource to get or create the lock on
- * @return the lock for the specified resource
- *
- * @deprecated Direct access to locks is discouraged as dead lock detection and lock
- * maintenance now relies on the call to {@link #lock(Object, Object, int, int, long)},
- * {@link #tryLock(Object, Object, int, int)}, {@link #release(Object, Object)} and
- * {@link #releaseAll(Object)}. This method will be deleted.
- */
- public MultiLevelLock atomicGetOrCreateLock(Object resourceId);
-
- /**
* Gets an existing lock on the specified resource. If none exists it returns <code>null</code>.
*
* @param resourceId the resource to get the lock for
* @return the lock on the specified resource
*
- * @deprecated Direct access to locks is discouraged as dead lock detection and lock
- * maintenance now relies on the call to {@link #lock(Object, Object, int, int, long)},
- * {@link #tryLock(Object, Object, int, int)}, {@link #release(Object, Object)} and
- * {@link #releaseAll(Object)}. This method will be deleted.
*/
public MultiLevelLock getLock(Object resourceId);
@@ -174,4 +156,18 @@
* @param lock the lock to be removed
*/
public void removeLock(MultiLevelLock lock);
+
+ /**
+ * Either gets an existing lock on the specified resource or creates one if none exists.
+ * This methods guarantees to do this atomically.
+ *
+ * @param resourceId the resource to get or create the lock on
+ * @return the lock for the specified resource
+ *
+ * @deprecated Direct access to locks is discouraged as dead lock detection and lock
+ * maintenance now relies on the call to {@link #lock(Object, Object, int, int, long)},
+ * {@link #tryLock(Object, Object, int, int)}, {@link #release(Object, Object)} and
+ * {@link #releaseAll(Object)}. This method will be deleted.
+ */
+ public MultiLevelLock atomicGetOrCreateLock(Object resourceId);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org