Lines Matching defs:parties

51  * for updating shared-state before any of the parties continue.
102 * <p>If the barrier action does not rely on the parties being suspended when
152 /** The number of parties */
153 private final int parties;
160 * Number of parties still waiting. Counts down from parties to 0
161 * on each generation. It is reset to parties on each new
174 count = parties;
184 count = parties;
260 * given number of parties (threads) are waiting upon it, and which
264 * @param parties the number of threads that must invoke {@link #await}
268 * @throws IllegalArgumentException if {@code parties} is less than 1
270 public CyclicBarrier(int parties, Runnable barrierAction) {
271 if (parties <= 0) throw new IllegalArgumentException();
272 this.parties = parties;
273 this.count = parties;
279 * given number of parties (threads) are waiting upon it, and
282 * @param parties the number of threads that must invoke {@link #await}
284 * @throws IllegalArgumentException if {@code parties} is less than 1
286 public CyclicBarrier(int parties) {
287 this(parties, null);
291 * Returns the number of parties required to trip this barrier.
293 * @return the number of parties required to trip this barrier
296 return parties;
300 * Waits until all {@linkplain #getParties parties} have invoked
362 * Waits until all {@linkplain #getParties parties} have invoked
433 * @return {@code true} if one or more parties broke out of this
449 * Resets the barrier to its initial state. If any parties are
469 * Returns the number of parties currently waiting at the barrier.
472 * @return the number of parties currently blocked in {@link #await}
478 return parties - count;