org.apache.ignite.internal.util

## Interface IgniteTree<L,T>

All Known Implementing Classes:
  BPlusTree, CacheDataTree, InlineIndexTree, MetastorageTree, PendingEntriesTree, TxLogTree

    public interface IgniteTree<L,T>

Interface for ignite internal tree.

### Nested Class Summary

Nested Classes
`static interface` `IgniteTree.InvokeClosure<T>`
`static class` `IgniteTree.OperationType`

### Method Summary

All Methods Instance Methods Abstract Methods
`GridCursor<T>` `find(L lower, L upper)` Returns a cursor from lower to upper bounds inclusive.
`GridCursor<T>` `find(L lower, L upper, Object x)` Returns a cursor from lower to upper bounds inclusive.
`T` `findFirst()` Returns a value mapped to the lowest key, or `null` if tree is empty
`T` `findLast()` Returns a value mapped to the greatest key, or `null` if tree is empty
`T` `findOne(L key)` Returns the value to which the specified key is mapped, or `null` if this tree contains no mapping for the key.
`void` `invoke(L key, Object x, IgniteTree.InvokeClosure<T> c)`
`T` `put(T val)` Put value in this tree.
`T` `remove(L key)` Removes the mapping for a key from this tree if it is present.
`long` `size()` Returns the number of elements in this tree.

### Method Detail

#### put

    T put(T val)
    throws IgniteCheckedException

Put value in this tree.

Parameters:
  `val` - Value to be associated with the specified key.
Returns:
  The previous value associated with key.
Throws:
  `IgniteCheckedException` - If failed.

#### invoke

    void invoke(L key,
                Object x,
                IgniteTree.InvokeClosure<T> c)
         throws IgniteCheckedException

Parameters:
  `key` - Key.
  `x` - Implementation specific argument, `null` always means that we need a full detached data row.
  `c` - Closure.
Throws:
  `IgniteCheckedException` - If failed.

#### findOne

    T findOne(L key)
       throws IgniteCheckedException

Returns the value to which the specified key is mapped, or `null` if this tree contains no mapping for the key.

Parameters:
  `key` - the key whose associated value is to be returned
Returns:
  the value to which the specified key is mapped, or `null` if this tree contains no mapping for the key.
Throws:
  `IgniteCheckedException` - If failed.

#### find

    GridCursor<T> find(L lower,
                       L upper)
                throws IgniteCheckedException

Returns a cursor from lower to upper bounds inclusive.

Parameters:
  `lower` - Lower bound or `null` if unbounded.
  `upper` - Upper bound or `null` if unbounded.
Returns:
  Cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### find

    GridCursor<T> find(L lower,
                       L upper,
                       Object x)
                throws IgniteCheckedException

Returns a cursor from lower to upper bounds inclusive.

Parameters:
  `lower` - Lower bound or `null` if unbounded.
  `upper` - Upper bound or `null` if unbounded.
  `x` - Implementation specific argument, `null` always means that we need to return full detached data row.
Returns:
  Cursor.
Throws:
  `IgniteCheckedException` - If failed.

#### findFirst

    T findFirst()
         throws IgniteCheckedException

Returns a value mapped to the lowest key, or `null` if tree is empty

Returns:
  Value.
Throws:
  `IgniteCheckedException` - If failed.

#### findLast

    T findLast()
        throws IgniteCheckedException

Returns a value mapped to the greatest key, or `null` if tree is empty

Returns:
  Value.
Throws:
  `IgniteCheckedException` - If failed.

#### remove

    T remove(L key)
      throws IgniteCheckedException

Removes the mapping for a key from this tree if it is present.

Parameters:
  `key` - Key whose mapping is to be removed from the tree.
Returns:
  The previous value associated with key, or null if there was no mapping for key.
Throws:
  `IgniteCheckedException` - If failed.

#### size

    long size()
       throws IgniteCheckedException

Returns the number of elements in this tree.

Returns:
  the number of elements in this tree
Throws:
  `IgniteCheckedException` - If failed.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023