org.apache.ignite.internal.processors.datastructures

## Interface GridCacheSemaphoreEx

All Superinterfaces:
  AutoCloseable, Closeable, GridCacheRemovable, IgniteSemaphore

All Known Implementing Classes:
  GridCacheSemaphoreImpl

    public interface GridCacheSemaphoreEx
    extends IgniteSemaphore, GridCacheRemovable

Grid cache semaphore (`'Ex'` stands for external).

### Method Summary

All Methods Instance Methods Abstract Methods
`GridCacheInternalKey` `key()` Get current semaphore key.
`void` `onNodeRemoved(UUID nodeId)` Callback to notify semaphore on topology changes.
`void` `onUpdate(GridCacheSemaphoreState val)` Callback to notify semaphore on changes.
`void` `stop()` Callback to notify local semaphore instance on node stop.

### Methods inherited from interface org.apache.ignite.IgniteSemaphore

`acquire, acquire, acquireAndExecute, acquireUninterruptibly, acquireUninterruptibly, availablePermits, close, drainPermits, getQueueLength, hasQueuedThreads, isBroken, isFailoverSafe, name, release, release, removed, tryAcquire, tryAcquire, tryAcquire, tryAcquire`

### Methods inherited from interface org.apache.ignite.internal.processors.datastructures.GridCacheRemovable

`needCheckNotRemoved, onRemoved, restart, suspend`

### Method Detail

#### key

    GridCacheInternalKey key()

Get current semaphore key.

Returns:
  Semaphore key.

#### onUpdate

    void onUpdate(GridCacheSemaphoreState val)

Callback to notify semaphore on changes.

Parameters:
  `val` - State containing the number of available permissions.

#### onNodeRemoved

    void onNodeRemoved(UUID nodeId)

Callback to notify semaphore on topology changes.

Parameters:
  `nodeId` - Id of the node that left the grid.

#### stop

    void stop()

Callback to notify local semaphore instance on node stop.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022