commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozeigerm...@apache.org
Subject cvs commit: jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking ReadWriteLockManager.java
Date Fri, 17 Dec 2004 00:21:16 GMT
ozeigermann    2004/12/16 16:21:16

  Modified:    transaction/src/java/org/apache/commons/transaction/locking
                        ReadWriteLockManager.java
  Log:
  Minor
  
  Revision  Changes    Path
  1.2       +15 -10    jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/ReadWriteLockManager.java
  
  Index: ReadWriteLockManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/transaction/src/java/org/apache/commons/transaction/locking/ReadWriteLockManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ReadWriteLockManager.java	14 Dec 2004 12:12:46 -0000	1.1
  +++ ReadWriteLockManager.java	17 Dec 2004 00:21:15 -0000	1.2
  @@ -42,6 +42,11 @@
           super(ReadWriteLock.WRITE_LOCK, logger, timeoutMSecs);
       }
   
  +    protected ReadWriteLockManager(int maxLockLevel, LoggerFacade logger, long timeoutMSecs)
  +            throws IllegalArgumentException {
  +        super(maxLockLevel, logger, timeoutMSecs);
  +    }
  +
       /**
        * Tries to acquire a shared, reentrant read lock on a resource. <br>
        * <br>
  @@ -52,11 +57,11 @@
        *            a unique id identifying the entity that wants to acquire this
        *            lock
        * @param resourceId
  -     *            the resource to get the level for
  +     *            the resource to get the lock for
        * @return <code>true</code> if the lock has been acquired, <code>false</code>
otherwise
        */
       public boolean tryReadLock(Object ownerId, Object resourceId) {
  -        return super.tryLock(ownerId, resourceId, ReadWriteLock.READ_LOCK, true);
  +        return tryLock(ownerId, resourceId, ReadWriteLock.READ_LOCK, true);
       }
   
       /**
  @@ -69,11 +74,11 @@
        *            a unique id identifying the entity that wants to acquire this
        *            lock
        * @param resourceId
  -     *            the resource to get the level for
  +     *            the resource to get the lock for
        * @return <code>true</code> if the lock has been acquired, <code>false</code>
otherwise
        */
       public boolean tryWriteLock(Object ownerId, Object resourceId) {
  -        return super.tryLock(ownerId, resourceId, ReadWriteLock.WRITE_LOCK, true);
  +        return tryLock(ownerId, resourceId, ReadWriteLock.WRITE_LOCK, true);
       }
   
       /**
  @@ -87,12 +92,12 @@
        *            a unique id identifying the entity that wants to acquire this
        *            lock
        * @param resourceId
  -     *            the resource to get the level for
  +     *            the resource to get the lock for
        * @throws LockException
        *             will be thrown when the lock can not be acquired
        */
       public void readLock(Object ownerId, Object resourceId) throws LockException {
  -        super.lock(ownerId, resourceId, ReadWriteLock.READ_LOCK, true);
  +        lock(ownerId, resourceId, ReadWriteLock.READ_LOCK, true);
       }
   
       /**
  @@ -106,12 +111,12 @@
        *            a unique id identifying the entity that wants to acquire this
        *            lock
        * @param resourceId
  -     *            the resource to get the level for
  +     *            the resource to get the lock for
        * @throws LockException
        *             will be thrown when the lock can not be acquired
        */
       public void writeLock(Object ownerId, Object resourceId) throws LockException {
  -        super.lock(ownerId, resourceId, ReadWriteLock.WRITE_LOCK, true);
  +        lock(ownerId, resourceId, ReadWriteLock.WRITE_LOCK, true);
       }
   
       protected GenericLock createLock(Object resourceId) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message