Class OnHeapLevelIndexHeader
- java.lang.Object
-
- org.apache.flink.runtime.state.heap.OnHeapLevelIndexHeader
-
- All Implemented Interfaces:
LevelIndexHeader
public class OnHeapLevelIndexHeader extends Object implements LevelIndexHeader
Implementation ofLevelIndexHeader
which stores index on heap.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLevel()
Returns the top level of skip list.long
getNextNode(int level)
Returns the next node in the given level.void
updateLevel(int level)
Updates the top level of skip list to the given level.void
updateNextNode(int level, long node)
Updates the next node in the given level to the specified node id.
-
-
-
Method Detail
-
getLevel
public int getLevel()
Description copied from interface:LevelIndexHeader
Returns the top level of skip list.- Specified by:
getLevel
in interfaceLevelIndexHeader
- Returns:
- the top level of skip list.
-
updateLevel
public void updateLevel(int level)
Description copied from interface:LevelIndexHeader
Updates the top level of skip list to the given level.- Specified by:
updateLevel
in interfaceLevelIndexHeader
- Parameters:
level
- the level which top level of skip list updates to.
-
getNextNode
public long getNextNode(int level)
Description copied from interface:LevelIndexHeader
Returns the next node in the given level.- Specified by:
getNextNode
in interfaceLevelIndexHeader
- Parameters:
level
- the level whose next node is returned.- Returns:
- id of the next node.
-
updateNextNode
public void updateNextNode(int level, long node)
Description copied from interface:LevelIndexHeader
Updates the next node in the given level to the specified node id.- Specified by:
updateNextNode
in interfaceLevelIndexHeader
- Parameters:
level
- the level whose next node is updated.node
- the id of the next node.
-
-