Java java.util.concurrent CyclicBarrier fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent CyclicBarrier fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent CyclicBarrier.

The text is from its open source code.

Subclass

java.util.concurrent.CyclicBarrier has subclasses.
Click this link to see all its subclasses.

Constructor

CyclicBarrier(int parties)
Creates a new CyclicBarrier that will trip when the given number of parties (threads) are waiting upon it, and does not perform a predefined action when the barrier is tripped.
CyclicBarrier(int parties, Runnable barrierAction)
Creates a new CyclicBarrier that will trip when the given number of parties (threads) are waiting upon it, and which will execute the given barrier action when the barrier is tripped, performed by the last thread entering the barrier.

Method

intawait()
Waits until all #getParties parties have invoked await on this barrier.
intawait(long timeout, TimeUnit unit)
Waits until all #getParties parties have invoked await on this barrier, or the specified waiting time elapses.
intgetNumberWaiting()
Returns the number of parties currently waiting at the barrier.
voidreset()
Resets the barrier to its initial state.