avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent ConditionalEvent.java DijkstraSemaphore.java ReadWriteLock.java ThreadBarrier.java
Date Fri, 22 Mar 2002 08:53:40 GMT
colus       02/03/22 00:53:40

  Modified:    all/src/java/org/apache/avalon/excalibur/concurrent
                        ConditionalEvent.java DijkstraSemaphore.java
                        ReadWriteLock.java ThreadBarrier.java
  Log:
  Formatting javadocs.
  
  Revision  Changes    Path
  1.5       +14 -9     jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/ConditionalEvent.java
  
  Index: ConditionalEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/ConditionalEvent.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConditionalEvent.java	16 Mar 2002 00:05:40 -0000	1.4
  +++ ConditionalEvent.java	22 Mar 2002 08:53:40 -0000	1.5
  @@ -17,7 +17,7 @@
    * or signalAll() was called).
    *
    * @author <a href="mailto:kranga@sapient.com">Karthik Rangaraju</a>
  - * @version CVS $Revision: 1.4 $ $Date: 2002/03/16 00:05:40 $
  + * @version CVS $Revision: 1.5 $ $Date: 2002/03/22 08:53:40 $
    * @since 4.0
    */
   public class ConditionalEvent
  @@ -31,7 +31,8 @@
   
       /**
        * Creates a manual reset ConditionalEvent with a specified initial state
  -     * @param pInitialState Sets the initial state of the ConditionalEvent.
  +     *
  +     * @param initialState Sets the initial state of the ConditionalEvent.
        * Signalled if pInitialState is true, unsignalled otherwise.
        */
       public ConditionalEvent( boolean initialState )
  @@ -40,10 +41,11 @@
       }
   
       /**
  -     * Creates a ConditionalEvent with the defined initial state
  -     * @param pInitialState if true, the ConditionalEvent is signalled when
  +     * Creates a ConditionalEvent with the defined initial state.
  +     *
  +     * @param initialState if true, the ConditionalEvent is signalled when
        * created.
  -     * @param pAutoReset if true creates an auto-reset ConditionalEvent
  +     * @param autoReset if true creates an auto-reset ConditionalEvent
        */
       public ConditionalEvent( boolean initialState, boolean autoReset )
       {
  @@ -52,7 +54,8 @@
       }
   
       /**
  -     * Checks if the event is signalled. Does not block on the operation
  +     * Checks if the event is signalled. Does not block on the operation.
  +     *
        * @return true is event is signalled, false otherwise. Does not reset
        * an autoreset event
        */
  @@ -62,7 +65,8 @@
       }
   
       /**
  -     * Signals the event. A single thread blocked on waitForSignal() is released
  +     * Signals the event. A single thread blocked on waitForSignal() is released.
  +     *
        * @see #signalAll()
        * @see #waitForSignal()
        */
  @@ -76,7 +80,8 @@
       }
   
       /**
  -     * Current implementation only works with manual reset events. Releases
  +     * Current implementation only works with manual reset events. Releases.
  +     *
        * all threads blocked on waitForSignal()
        * @see #waitForSignal()
        */
  @@ -103,6 +108,7 @@
       /**
        * If the event is signalled, this method returns immediately resetting the
        * signal, otherwise it blocks until the event is signalled.
  +     *
        * @throws InterruptedException if the thread is interrupted when blocked
        */
       public void waitForSignal()
  @@ -120,5 +126,4 @@
               }
           }
       }
  -
   }
  
  
  
  1.5       +17 -9     jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/DijkstraSemaphore.java
  
  Index: DijkstraSemaphore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/DijkstraSemaphore.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DijkstraSemaphore.java	16 Mar 2002 00:05:40 -0000	1.4
  +++ DijkstraSemaphore.java	22 Mar 2002 08:53:40 -0000	1.5
  @@ -15,7 +15,7 @@
    * calls release() thus increasing the count.
    *
    * @author <a href="mailto:kranga@sapient.com">Karthik Rangaraju</a>
  - * @version CVS $Revision: 1.4 $ $Date: 2002/03/16 00:05:40 $
  + * @version CVS $Revision: 1.5 $ $Date: 2002/03/22 08:53:40 $
    * @since 4.0
    */
   public class DijkstraSemaphore
  @@ -26,8 +26,9 @@
   
       /**
        * Creates a Djikstra semaphore with the specified max count and initial
  -     * count set to the max count (all resources released)
  -     * @param pMaxCount is the max semaphores that can be acquired
  +     * count set to the max count (all resources released).
  +     *
  +     * @param maxCount is the max semaphores that can be acquired
        */
       public DijkstraSemaphore( int maxCount )
       {
  @@ -38,6 +39,7 @@
        * Creates a Djikstra semaphore with the specified max count and an initial
        * count of acquire() operations that are assumed to have already been
        * performed.
  +     *
        * @param maxCount is the max semaphores that can be acquired
        * @param initialCount is the current count (setting it to zero means all
        * semaphores have already been acquired). 0 <= initialCount <= maxCount
  @@ -51,6 +53,7 @@
       /**
        * If the count is non-zero, acquires a semaphore and decrements the count
        * by 1, otherwise blocks until a release() is executed by some other thread.
  +     *
        * @throws InterruptedException is the thread is interrupted when blocked
        * @see #tryAcquire()
        * @see #acquireAll()
  @@ -79,6 +82,7 @@
   
       /**
        * Non-blocking version of acquire().
  +     *
        * @return true if semaphore was acquired (count is decremented by 1), false
        * otherwise
        */
  @@ -111,7 +115,8 @@
        * acquired the semaphore previously. If more releases are performed than
        * acquires, the count is not increased beyond the max count specified during
        * construction.
  -     * @see #release( int pCount )
  +     *
  +     * @see #release( int count )
        * @see #releaseAll()
        */
       public void release()
  @@ -130,8 +135,9 @@
       /**
        * Same as release() except that the count is increased by pCount instead
        * of 1. The resulting count is capped at max count specified in the
  -     * constructor
  -     * @param pCount is the amount by which the counter should be incremented
  +     * constructor.
  +     *
  +     * @param count is the amount by which the counter should be incremented
        * @see #release()
        */
       public void release( int count )
  @@ -152,6 +158,7 @@
   
       /**
        * Tries to acquire all the semaphores thus bringing the count to zero.
  +     *
        * @throws InterruptedException if the thread is interrupted when blocked on
        * this call
        * @see #acquire()
  @@ -173,6 +180,7 @@
        * Releases all semaphores setting the count to max count.
        * Warning: If this method is called by a thread that did not make a
        * corresponding acquireAll() call, then you better know what you are doing!
  +     *
        * @see #acquireAll()
        */
       public void releaseAll()
  @@ -189,7 +197,8 @@
        * The method is not stateful and hence a drop to zero will not be recognized
        * if a release happens before this call. You can use this method to implement
        * threads that dynamically increase the resource pool or that log occurences
  -     * of resource starvation. Also called a reverse-sensing semaphore
  +     * of resource starvation. Also called a reverse-sensing semaphore.
  +     *
        * @throws InterruptedException if the thread is interrupted while waiting
        */
       public void starvationCheck()
  @@ -203,5 +212,4 @@
               }
           }
       }
  -}
  -
  +}
  \ No newline at end of file
  
  
  
  1.9       +5 -6      jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/ReadWriteLock.java
  
  Index: ReadWriteLock.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/ReadWriteLock.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ReadWriteLock.java	16 Mar 2002 00:05:40 -0000	1.8
  +++ ReadWriteLock.java	22 Mar 2002 08:53:40 -0000	1.9
  @@ -19,7 +19,7 @@
    * will take priority over those trying to get a read lock.
    *
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
  - * @version CVS $Revision: 1.8 $ $Date: 2002/03/16 00:05:40 $
  + * @version CVS $Revision: 1.9 $ $Date: 2002/03/22 08:53:40 $
    * @since 4.0
    */
   public class ReadWriteLock
  @@ -51,7 +51,7 @@
        * the thread will wait until it can be obtained.
        *
        * @throws InterruptedException if the thread is interrupted while waiting for
  -     *                              a lock.
  +     * a lock.
        */
       public void aquireRead()
           throws InterruptedException
  @@ -71,7 +71,7 @@
        * the thread will wait until it can be obtained.
        *
        * @throws InterruptedException if the thread is interrupted while waiting for
  -     *                              a lock.
  +     * a lock.
        */
       public void aquireWrite()
           throws InterruptedException
  @@ -98,7 +98,7 @@
        * Releases a lock. This method will release both types of locks.
        *
        * @throws IllegalStateException when an attempt is made to release
  -     *                               an unlocked lock.
  +     * an unlocked lock.
        */
       public void release()
       {
  @@ -163,5 +163,4 @@
               }
           }
       }
  -}
  -
  +}
  \ No newline at end of file
  
  
  
  1.5       +7 -5      jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/ThreadBarrier.java
  
  Index: ThreadBarrier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/ThreadBarrier.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ThreadBarrier.java	16 Mar 2002 00:05:40 -0000	1.4
  +++ ThreadBarrier.java	22 Mar 2002 08:53:40 -0000	1.5
  @@ -14,7 +14,7 @@
    * of providing mutual exclusion to shared resources
    *
    * @author <a href="mailto:kranga@sapient.com">Karthik Rangaraju</a>
  - * @version CVS $Revision: 1.4 $ $Date: 2002/03/16 00:05:40 $
  + * @version CVS $Revision: 1.5 $ $Date: 2002/03/22 08:53:40 $
    * @since 4.0
    */
   public class ThreadBarrier
  @@ -23,8 +23,9 @@
       private int m_count;
   
       /**
  -     * Initializes a thread barrier object with a given thread count
  -     * @param pCount is the number of threads that need to block on
  +     * Initializes a thread barrier object with a given thread count.
  +     *
  +     * @param count is the number of threads that need to block on
        * barrierSynchronize() before they will be allowed to pass through
        * @see #barrierSynchronize()
        */
  @@ -36,7 +37,8 @@
   
       /**
        * This method blocks all threads calling it until the threshold number of
  -     * threads have called it. It then releases all threads blocked by it
  +     * threads have called it. It then releases all threads blocked by it.
  +     *
        * @throws InterruptedException if any thread blocked during the call is
        * interrupted
        */
  @@ -57,4 +59,4 @@
               }
           }
       }
  -}
  +}
  \ No newline at end of file
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message