E - the element typepublic class FileMapListBuffer<E extends org.apache.hadoop.io.Writable> extends AbstractList<E> implements ListBuffer<E>
ListBuffer which may spill contents into backing temporary files.modCount| Constructor and Description |
|---|
FileMapListBuffer()
Creates a new instance.
|
FileMapListBuffer(int cacheSize)
Creates a new instance.
|
FileMapListBuffer(int cacheSize,
int bufferSoftLimit)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
E |
advance()
Returns the next element object on the internal cursor, and then move the cursor to the next element.
|
void |
begin()
Begins changing the list buffer.
|
void |
end()
Ends changing the list buffer.
|
void |
expand(E value)
Adds a new element object into the tail of this buffer.
|
E |
get(int index) |
boolean |
isExpandRequired()
Returns whether a new element object is required for the buffer or not.
|
void |
shrink()
Shrinks this buffer.
|
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streampublic FileMapListBuffer()
public FileMapListBuffer(int cacheSize)
cacheSize - the number of objects should be cached on Java heappublic FileMapListBuffer(int cacheSize,
int bufferSoftLimit)
cacheSize - the number of objects should be cached on Java heapbufferSoftLimit - the buffer size soft limit in bytespublic void begin()
ListBufferListBuffer.advance().
After changing the buffer, then clients must invoke ListBuffer.end() and the buffer can be used as the
unmodifiable list.begin in interface ListBuffer<E extends org.apache.hadoop.io.Writable>ListBuffer.advance()public void end()
ListBufferListBuffer.begin() once more.end in interface ListBuffer<E extends org.apache.hadoop.io.Writable>public boolean isExpandRequired()
ListBufferListBuffer.expand(Object) to add a new object before invoke ListBuffer.advance().
This method must be invoked between ListBuffer.begin() and ListBuffer.end().isExpandRequired in interface ListBuffer<E extends org.apache.hadoop.io.Writable>true if a new element object is required, otherwise falseListBuffer.expand(Object)public void expand(E value)
ListBufferListBuffer.begin() and ListBuffer.end().expand in interface ListBuffer<E extends org.apache.hadoop.io.Writable>value - the objectListBuffer.isExpandRequired(),
ListBuffer.isExpandRequired()public E advance()
ListBufferListBuffer.begin() and ListBuffer.end().advance in interface ListBuffer<E extends org.apache.hadoop.io.Writable>ListBuffer.isExpandRequired(),
ListBuffer.expand(Object)public E get(int index)
public int size()
size in interface Collection<E extends org.apache.hadoop.io.Writable>size in interface List<E extends org.apache.hadoop.io.Writable>size in class AbstractCollection<E extends org.apache.hadoop.io.Writable>public void shrink()
ListBuffershrink in interface ListBuffer<E extends org.apache.hadoop.io.Writable>Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.