org.apache.ignite.internal.processors.datastructures

## Class GridCacheLockState

- java.lang.Object
- - org.apache.ignite.internal.processors.datastructures.AtomicDataStructureValue
  - - org.apache.ignite.internal.processors.datastructures.VolatileAtomicDataStructureValue
    - - org.apache.ignite.internal.processors.datastructures.GridCacheLockState

All Implemented Interfaces:
  Externalizable, Serializable, Cloneable, GridCacheInternal

    public final class GridCacheLockState
    extends VolatileAtomicDataStructureValue
    implements Cloneable

Grid cache reentrant lock state.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridCacheLockState()` Empty constructor required for `Externalizable`.
`GridCacheLockState(int cnt, UUID id, long threadID, boolean failoverSafe, boolean fair, long gridStartTime)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `clone()`
`int` `condtionCount()`
`int` `get()`
`Map<String,LinkedList<UUID>>` `getConditionMap()`
`UUID` `getId()`
`LinkedList<UUID>` `getNodes()`
`Map<UUID,LinkedList<String>>` `getSignals()`
`long` `getThreadId()`
`long` `gridStartTime()`
`boolean` `isChanged()`
`boolean` `isFailoverSafe()`
`boolean` `isFair()`
`void` `readExternal(ObjectInput in)`
`void` `set(int cnt)`
`void` `setChanged(boolean changed)`
`void` `setConditionMap(Map<String,LinkedList<UUID>> conditionMap)`
`void` `setId(UUID id)`
`void` `setNodes(LinkedList<UUID> nodes)`
`void` `setSignals(Map<UUID,LinkedList<String>> signals)`
`void` `setThreadId(long threadId)`
`String` `toString()`
`DataStructureType` `type()`
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### GridCacheLockState

    public GridCacheLockState(int cnt,
                              UUID id,
                              long threadID,
                              boolean failoverSafe,
                              boolean fair,
                              long gridStartTime)

Constructor.

Parameters:
  `cnt` - Initial count.
  `id` - UUID of owning node.
  `threadID` - ID of the current thread.
  `failoverSafe` - true if created in failoverSafe mode.
  `fair` - true if created in fair mode.
  `gridStartTime` - Cluster start time.

#### GridCacheLockState

    public GridCacheLockState()

Empty constructor required for `Externalizable`.

### Method Detail

#### type

    public DataStructureType type()

Specified by:
  `type` in class `AtomicDataStructureValue`
Returns:
  Data structure type.

#### gridStartTime

    public long gridStartTime()

Specified by:
  `gridStartTime` in class `VolatileAtomicDataStructureValue`
Returns:
  Grid start time.

#### set

    public void set(int cnt)

Parameters:
  `cnt` - New count.

#### get

    public int get()

Returns:
  Current count.

#### getThreadId

    public long getThreadId()

Returns:
  Current owner thread ID.

#### setThreadId

    public void setThreadId(long threadId)

Parameters:
  `threadId` - New thread owner ID.

#### getId

    public UUID getId()

Returns:
  Current owner node ID.

#### setId

    public void setId(UUID id)

Parameters:
  `id` - New owner node ID.

#### isFailoverSafe

    public boolean isFailoverSafe()

Returns:
  Failover safe flag.

#### condtionCount

    public int condtionCount()

Returns:
  Condition count.

#### getConditionMap

    public Map<String,LinkedList<UUID>> getConditionMap()

Returns:
  Condition map.

#### setConditionMap

    public void setConditionMap(Map<String,LinkedList<UUID>> conditionMap)

Parameters:
  `conditionMap` - Condition map.

#### getSignals

    public Map<UUID,LinkedList<String>> getSignals()

Returns:
  Signals.

#### setSignals

    public void setSignals(Map<UUID,LinkedList<String>> signals)

Parameters:
  `signals` - Signals.

#### getNodes

    public LinkedList<UUID> getNodes()

Returns:
  Nodes.

#### setNodes

    public void setNodes(LinkedList<UUID> nodes)

Parameters:
  `nodes` - Nodes.

#### isFair

    public boolean isFair()

Returns:
  Fair flag.

#### isChanged

    public boolean isChanged()

Returns:
  Changed flag.

#### setChanged

    public void setChanged(boolean changed)

Parameters:
  `changed` - Changed 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`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021