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 voidadd(@NotNull NodeStateEntry item)Add an item at the tail of the list.voidclose()longestimatedMemoryUsage()booleanisEmpty()Iterator<NodeStateEntry>iterator()Get an iterator to iterate over the whole listNodeStateEntryremove()Remove the first item from the list.intsize()
-
-
-
Method Detail
-
add
public void add(@NotNull @NotNull NodeStateEntry item)Description copied from interface:NodeStateEntryListAdd an item at the tail of the list.- Specified by:
addin interfaceNodeStateEntryList
-
remove
public NodeStateEntry remove()
Description copied from interface:NodeStateEntryListRemove the first item from the list.- Specified by:
removein interfaceNodeStateEntryList- Returns:
- the removed item
-
iterator
public Iterator<NodeStateEntry> iterator()
Description copied from interface:NodeStateEntryListGet an iterator to iterate over the whole list- Specified by:
iteratorin interfaceNodeStateEntryList
-
size
public int size()
- Specified by:
sizein interfaceNodeStateEntryList
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceNodeStateEntryList
-
estimatedMemoryUsage
public long estimatedMemoryUsage()
- Specified by:
estimatedMemoryUsagein interfaceNodeStateEntryList
-
close
public void close()
- Specified by:
closein interfaceNodeStateEntryList
-
-