org.apache.ignite.internal.processors.datastructures

## Class GridCacheSemaphoreState

- java.lang.Object
- - org.apache.ignite.internal.processors.datastructures.GridCacheSemaphoreState

All Implemented Interfaces:
  Externalizable, Serializable, Cloneable, GridCacheInternal

    public class GridCacheSemaphoreState
    extends Object
    implements GridCacheInternal, Externalizable, Cloneable

Grid cache semaphore state.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridCacheSemaphoreState()` Empty constructor required for `Externalizable`.
`GridCacheSemaphoreState(int cnt, Map<UUID,Integer> waiters, boolean failoverSafe)` Constructor.

### Method Summary

Methods
`Object` `clone()`
`int` `getCount()`
`Map<UUID,Integer>` `getWaiters()`
`boolean` `isFailoverSafe()`
`void` `readExternal(ObjectInput in)`
`void` `setCount(int cnt)`
`void` `setWaiters(Map<UUID,Integer> waiters)`
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### GridCacheSemaphoreState

    public GridCacheSemaphoreState(int cnt,
                           @Nullable
                           Map<UUID,Integer> waiters,
                           boolean failoverSafe)

Constructor.

Parameters:
  `cnt` - Number of permissions.
  `waiters` - Waiters map.
  `failoverSafe` - Failover safe flag.

#### GridCacheSemaphoreState

    public GridCacheSemaphoreState()

Empty constructor required for `Externalizable`.

### Method Detail

#### setCount

    public void setCount(int cnt)

Parameters:
  `cnt` - New count.

#### getCount

    public int getCount()

Returns:
  Current count.

#### getWaiters

    public Map<UUID,Integer> getWaiters()

Returns:
  Waiters.

#### setWaiters

    public void setWaiters(Map<UUID,Integer> waiters)

Parameters:
  `waiters` - Map containing the number of permissions acquired by each node.

#### isFailoverSafe

    public boolean isFailoverSafe()

Returns:
  failoverSafe flag.

#### clone

    public Object clone()
                 throws CloneNotSupportedException

Overrides:
  `clone` in class `Object`
Throws:
  `CloneNotSupportedException`

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.6.0
Release Date | : May 18 2016