Class FlatFileBufferLinkedList
- java.lang.Object
-
- org.apache.jackrabbit.oak.index.indexer.document.flatfile.linkedList.FlatFileBufferLinkedList
-
- All Implemented Interfaces:
NodeStateEntryList
public class FlatFileBufferLinkedList extends Object implements NodeStateEntryList
Linked list implementation which supports multiple iterators. The iterator's state is backed by an actual node in the list. So, modification in the list show up in iterator (assuming thread safely/volatility) getting handled outside of the class.
-
-
Constructor Summary
Constructors Constructor Description FlatFileBufferLinkedList()
FlatFileBufferLinkedList(long memLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(@NotNull NodeStateEntry item)
Add an item at the tail of the list.void
close()
long
estimatedMemoryUsage()
boolean
isEmpty()
Iterator<NodeStateEntry>
iterator()
Get an iterator to iterate over the whole listNodeStateEntry
remove()
Remove the first item from the list.int
size()
-
-
-
Method Detail
-
add
public void add(@NotNull @NotNull NodeStateEntry item)
Description copied from interface:NodeStateEntryList
Add an item at the tail of the list.- Specified by:
add
in interfaceNodeStateEntryList
-
remove
public NodeStateEntry remove()
Description copied from interface:NodeStateEntryList
Remove the first item from the list.- Specified by:
remove
in interfaceNodeStateEntryList
- Returns:
- the removed item
-
iterator
public Iterator<NodeStateEntry> iterator()
Description copied from interface:NodeStateEntryList
Get an iterator to iterate over the whole list- Specified by:
iterator
in interfaceNodeStateEntryList
-
size
public int size()
- Specified by:
size
in interfaceNodeStateEntryList
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceNodeStateEntryList
-
estimatedMemoryUsage
public long estimatedMemoryUsage()
- Specified by:
estimatedMemoryUsage
in interfaceNodeStateEntryList
-
close
public void close()
- Specified by:
close
in interfaceNodeStateEntryList
-
-