ozeigermann 2005/01/09 15:56:07 Modified: transaction/src/java/org/apache/commons/transaction/locking MultiLevelLock2.java GenericLock.java Log: Let MultiLevelLock2 share commons methods of MultiLevelLock by extending it Revision Changes Path 1.3 +5 -19 jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/MultiLevelLock2.java Index: MultiLevelLock2.java =================================================================== RCS file: /home/cvs/jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/MultiLevelLock2.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- MultiLevelLock2.java 9 Jan 2005 15:12:11 -0000 1.2 +++ MultiLevelLock2.java 9 Jan 2005 23:56:07 -0000 1.3 @@ -34,7 +34,7 @@ * @see GenericLock * @since 1.1 */ -public interface MultiLevelLock2 { +public interface MultiLevelLock2 extends MultiLevelLock { /** * Compatibility mode: none reentrant. Lock level by the same owner <em>shall</em> @@ -119,18 +119,4 @@ public boolean acquire(Object ownerId, int targetLockLevel, boolean wait, int compatibility, boolean preferred, long timeoutMSecs) throws InterruptedException; - /** - * Releases any lock levels the specified owner may hold on this lock. - * - * @param ownerId a unique id identifying the entity that wants to release all lock levels - */ - public void release(Object ownerId); - - /** - * Retuns the highest lock level the specified owner holds on this lock or <code>0</code> if it holds no locks at all. - * - * @param ownerId a unique id identifying the entity that wants to know its highest lock level - * @return the highest lock level - */ - public int getLockLevel(Object ownerId); } 1.13 +5 -5 jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/GenericLock.java Index: GenericLock.java =================================================================== RCS file: /home/cvs/jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/GenericLock.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- GenericLock.java 9 Jan 2005 15:12:11 -0000 1.12 +++ GenericLock.java 9 Jan 2005 23:56:07 -0000 1.13 @@ -124,7 +124,7 @@ * * @version $Revision$ */ -public class GenericLock implements MultiLevelLock, MultiLevelLock2 { +public class GenericLock implements MultiLevelLock2 { protected Object resourceId; // XXX needs to be synchronized to allow for unsynchronized access for deadlock detection
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]