Lines Matching defs:count

44  * <p>A {@code CountDownLatch} is initialized with a given <em>count</em>.
45 * The {@link #await await} methods block until the current count reaches
49 * -- the count cannot be reset. If you need a version that resets the
50 * count, consider using a {@link CyclicBarrier}.
54 * {@code CountDownLatch} initialized with a count of one serves as a
63 * the count to reach zero before proceeding, it simply prevents any
115 * count down in this way, instead use a {@link CyclicBarrier}.)
147 * <p>Memory consistency effects: Until the count reaches
160 * Uses AQS state to represent count.
165 Sync(int count) {
166 setState(count);
178 // Decrement count; signal when transition to zero
193 * Constructs a {@code CountDownLatch} initialized with the given count.
195 * @param count the number of times {@link #countDown} must be invoked
197 * @throws IllegalArgumentException if {@code count} is negative
199 public CountDownLatch(int count) {
200 if (count < 0) throw new IllegalArgumentException("count < 0");
201 this.sync = new Sync(count);
208 * <p>If the current count is zero then this method returns immediately.
210 * <p>If the current count is greater than zero then the current
214 * <li>The count reaches zero due to invocations of the
240 * <p>If the current count is zero then this method returns immediately
243 * <p>If the current count is greater than zero then the current
247 * <li>The count reaches zero due to invocations of the
254 * <p>If the count reaches zero then the method returns with the
271 * @return {@code true} if the count reached zero and {@code false}
272 * if the waiting time elapsed before the count reached zero
282 * Decrements the count of the latch, releasing all waiting threads if
283 * the count reaches zero.
285 * <p>If the current count is greater than zero then it is decremented.
286 * If the new count is zero then all waiting threads are re-enabled for
289 * <p>If the current count equals zero then nothing happens.
296 * Returns the current count.
300 * @return the current count
309 * followed by the current count.