org.apache.ignite.internal.processors.cache.distributed.near

## Class GridNearOptimisticTxPrepareFutureAdapter.KeyLockFuture

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<Void>
  - - org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter.KeyLockFuture

All Implemented Interfaces:
  IgniteInternalFuture<Void>

Enclosing class:
  GridNearOptimisticTxPrepareFutureAdapter

    protected static class GridNearOptimisticTxPrepareFutureAdapter.KeyLockFuture
    extends GridFutureAdapter<Void>

Keys lock future.

### Field Summary

Fields
`protected boolean` `allKeysAdded`
`protected Collection<IgniteTxKey>` `lockKeys`

### Constructor Summary

Constructors
`protected` `KeyLockFuture()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `addLockKey(IgniteTxKey key)`
`protected void` `onAllKeysAdded()` Moves future to the ready state.
`protected void` `onKeyLocked(IgniteTxKey key)`
`String` `toString()`

### Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter

`cancel, chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, onDone, onDone, reset, result`

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

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

### Field Detail

#### lockKeys

    @GridToStringInclude
    protected Collection<IgniteTxKey> lockKeys

#### allKeysAdded

    protected volatile boolean allKeysAdded

### Constructor Detail

#### KeyLockFuture

    protected KeyLockFuture()

### Method Detail

#### addLockKey

    protected void addLockKey(IgniteTxKey key)

Parameters:
  `key` - Key to track for locking.

#### onKeyLocked

    protected void onKeyLocked(IgniteTxKey key)

Parameters:
  `key` - Locked keys.

#### onAllKeysAdded

    protected void onAllKeysAdded()

Moves future to the ready state.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridFutureAdapter<Void>`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020