Class FSArrayFileInMem<V extends org.apache.hadoop.io.Writable>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<V>
-
- org.terrier.structures.collections.FSArrayFile<V>
-
- org.terrier.structures.collections.FSArrayFileInMem<V>
-
- Type Parameters:
V
- Type of Writable
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Iterable<V>
,java.util.Collection<V>
,java.util.List<V>
- Direct Known Subclasses:
FSADocumentIndexInMem
public class FSArrayFileInMem<V extends org.apache.hadoop.io.Writable> extends FSArrayFile<V>
Version of FSArrayFile that keeps the file contents in memory, and decodes the bytes into object as required.- Since:
- 3.0
- Author:
- Craig Macdonald
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terrier.structures.collections.FSArrayFile
FSArrayFile.ArrayFileIterator<V extends org.apache.hadoop.io.Writable>, FSArrayFile.ArrayFileWriter
-
-
Field Summary
-
Fields inherited from class org.terrier.structures.collections.FSArrayFile
dataFile, dataFilename, entrySize, numberOfEntries, USUAL_EXTENSION, valueFactory
-
-
Constructor Summary
Constructors Constructor Description FSArrayFileInMem(java.lang.String filename, boolean updateable, FixedSizeWriteableFactory<V> factory)
constructorFSArrayFileInMem(IndexOnDisk index, java.lang.String structureName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
get(int entryNumber)
-
Methods inherited from class org.terrier.structures.collections.FSArrayFile
close, iterator, size, writeFSArrayFile
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
FSArrayFileInMem
public FSArrayFileInMem(IndexOnDisk index, java.lang.String structureName) throws java.io.IOException
- Throws:
java.io.IOException
-
FSArrayFileInMem
public FSArrayFileInMem(java.lang.String filename, boolean updateable, FixedSizeWriteableFactory<V> factory) throws java.io.IOException
constructor- Parameters:
filename
-updateable
-factory
-- Throws:
java.io.IOException
-
-
Method Detail
-
get
public V get(int entryNumber)
- Specified by:
get
in interfacejava.util.List<V extends org.apache.hadoop.io.Writable>
- Overrides:
get
in classFSArrayFile<V extends org.apache.hadoop.io.Writable>
-
-