Package org.apache.ignite.internal.util
Interface IgniteTree<L,T>
-
- All Known Implementing Classes:
BPlusTree,CacheDataTree,InlineIndexTree,MetastorageTree,PendingEntriesTree
public interface IgniteTree<L,T>Interface for ignite internal tree.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIgniteTree.InvokeClosure<T>static classIgniteTree.OperationType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.TfindFirst()Returns a value mapped to the lowest key, ornullif tree is emptyTfindLast()Returns a value mapped to the greatest key, ornullif tree is emptyTfindOne(L key)Returns the value to which the specified key is mapped, ornullif this tree contains no mapping for the key.voidinvoke(L key, Object x, IgniteTree.InvokeClosure<T> c)Tput(T val)Put value in this tree.Tremove(L key)Removes the mapping for a key from this tree if it is present.longsize()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,nullalways 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, ornullif 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
nullif 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 ornullif unbounded.upper- Upper bound ornullif 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 ornullif unbounded.upper- Upper bound ornullif unbounded.x- Implementation specific argument,nullalways 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, ornullif tree is empty- Returns:
- Value.
- Throws:
IgniteCheckedException- If failed.
-
findLast
T findLast() throws IgniteCheckedException
Returns a value mapped to the greatest key, ornullif 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.
-
-