Package org.apache.ignite.spi.systemview.view.datastructures

## Class SemaphoreView

- java.lang.Object
- - org.apache.ignite.spi.systemview.view.datastructures.SemaphoreView

-     public class SemaphoreView
      extends Object

  `IgniteSemaphore` representation for a `SystemView`.
  See Also:
    `Ignite.semaphore(String, int, boolean, boolean)`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected T` | `ds` | Data structure instance.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SemaphoreView​(org.apache.ignite.internal.processors.datastructures.GridCacheRemovable ds)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `availablePermits()` |
    `boolean` | `broken()` |
    `boolean` | `failoverSafe()` |
    `int` | `groupId()` |
    `String` | `groupName()` |
    `boolean` | `hasQueuedThreads()` |
    `String` | `name()` |
    `int` | `queueLength()` |
    `boolean` | `removed()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ds

          protected final T extends org.apache.ignite.internal.processors.datastructures.AtomicDataStructureProxy ds

      Data structure instance.

  - ### Constructor Detail

    - #### SemaphoreView

          public SemaphoreView​(org.apache.ignite.internal.processors.datastructures.GridCacheRemovable ds)

      Parameters:
        `ds` - Data structure instance.

  - ### Method Detail

    - #### availablePermits

          public long availablePermits()

      Returns:
        Number of permits available.
      See Also:
        `IgniteSemaphore.availablePermits()`

    - #### hasQueuedThreads

          public boolean hasQueuedThreads()

      Returns:
        `True` if there may be other threads waiting to acquire the lock.
      See Also:
        `IgniteSemaphore.hasQueuedThreads()`

    - #### queueLength

          public int queueLength()

      Returns:
        The estimated number of nodes waiting for this lock.
      See Also:
        `IgniteSemaphore.getQueueLength()`

    - #### failoverSafe

          public boolean failoverSafe()

      Returns:
        `True` if this semaphore is failover safe.
      See Also:
        `IgniteSemaphore.isFailoverSafe()`

    - #### broken

          public boolean broken()

      Returns:
        `True` if a node failed on this semaphore and `failoverSafe()` flag was set to `false`, `false` otherwise.
      See Also:
        `IgniteSemaphore.isBroken()`

    - #### name

          public String name()

      Returns:
        Name.

    - #### groupName

          public String groupName()

      Returns:
        Group name.

    - #### groupId

          public int groupId()

      Returns:
        Group id.

    - #### removed

          public boolean removed()

      Returns:
        `True` is data structure removed.