E
- public class OnDiskChunkedList<E>
extends java.util.AbstractList<E>
implements java.util.List<E>, java.util.RandomAccess
AbstractList
which maintains data in chunks, chunks exceeding the
maximum number of in memory chunks are swapped to disk, freeing memory.Collections.shuffle(List)
), it is better to have more
small chunks in memory than fewer larger chunks.Modifier and Type | Field and Description |
---|---|
static int |
MIN_CHUNCK_SIZE |
static int |
MIN_CHUNCKS_IN_MEMORY |
Constructor and Description |
---|
OnDiskChunkedList(int chunksInMemory,
int chunkSize,
java.io.File tmpDir) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
E element) |
boolean |
addAll(int index,
java.util.Collection<? extends E> c) |
void |
clear() |
E |
get(int index) |
E |
remove(int index) |
void |
removeRange(int fromIndex,
int toIndex) |
E |
set(int index,
E element) |
int |
size() |
add, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList
public static final int MIN_CHUNCKS_IN_MEMORY
public static final int MIN_CHUNCK_SIZE
public OnDiskChunkedList(int chunksInMemory, int chunkSize, java.io.File tmpDir)
public E get(int index)
public final int size()
public void clear()
public void add(int index, E element)
public boolean addAll(int index, java.util.Collection<? extends E> c)
public E remove(int index)
public void removeRange(int fromIndex, int toIndex)
removeRange
in class java.util.AbstractList<E>