CountDownLatch

Java 5 introduced the java.util.concurrent package for concurrent programming. It contains many useful utility classes, such as the CountDownLatch class for synchronizing threads within a JVM. Apache Ignite's IgniteCountDownLatch synchronizes threads across the cluster nodes.

You can create a IgniteCountDownLatch using the following syntax: IgniteCountDownLatch latch = ignite.countDownLatch(name, cnt, autoDel, create);

The countDownLatch method accepts the following arguments:

  • name: The name of the latch.
  • cnt: The count for new latch creation. If the create flag is false (it means you want to fetch an existing), then this value is ignored.
  • autoDel: If this flag is true, then the latch will be deleted from cache when its count ...

Get Apache Ignite Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.