org.apache.ignite.internal.processors.cache.distributed.dht.preloader.latch

## Interface Latch

    public interface Latch

Simple distributed count down latch interface. Latch supports count down and await logic. Latch functionality is not relied on caches and has own state management `ExchangeLatchManager`.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `await()` Awaits current latch completion.
`void` `await(long timeout, TimeUnit timeUnit)` Awaits current latch completion with specified timeout.
`void` `countDown()` Decrements count on current latch.

### Method Detail

#### countDown

    void countDown()

Decrements count on current latch. Release all latch waiters on all nodes if count reaches zero. This is idempotent operation. Invoking this method twice or more on the same node doesn't have any effect.

#### await

    void await()
        throws IgniteCheckedException

Awaits current latch completion.

Throws:
  `IgniteCheckedException` - If await is failed.

#### await

    void await(long timeout,
               TimeUnit timeUnit)
        throws IgniteCheckedException

Awaits current latch completion with specified timeout.

Parameters:
  `timeout` - Timeout value.
  `timeUnit` - Timeout time unit.
Throws:
  `IgniteCheckedException` - If await is failed.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023