public class FileBackedList<T> extends Object implements AutoCloseable
File entry format:
Pointers to the offset of each entry are kept in a List<Long>.
The values loaded from the the file are cached up to a maximum of
cacheSize. Items are evicted from the cache with an LRU algorithm.
| Constructor and Description |
|---|
FileBackedList(Class<T> type,
File file,
int cacheSize) |
public FileBackedList(Class<T> type, File file, int cacheSize) throws IOException
IOExceptionpublic void add(T obj)
public T getAt(int index)
public void close()
close in interface AutoCloseableCopyright © 2017. All rights reserved.