org.terrier.structures.collections
Class FSArrayFileInMem<V extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<V>
          extended by org.terrier.structures.collections.FSArrayFile<V>
              extended by org.terrier.structures.collections.FSArrayFileInMem<V>
Type Parameters:
V - Type of Writable
All Implemented Interfaces:
Closeable, Iterable<V>, Collection<V>, List<V>

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
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FSArrayFileInMem(String filename, boolean updateable, FixedSizeWriteableFactory<V> factory)
          constructor
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

FSArrayFileInMem

public FSArrayFileInMem(String filename,
                        boolean updateable,
                        FixedSizeWriteableFactory<V> factory)
                 throws IOException
constructor

Parameters:
filename -
updateable -
factory -
Throws:
IOException
Method Detail

get

public V get(int entryNumber)

Specified by:
get in interface List<V extends org.apache.hadoop.io.Writable>
Overrides:
get in class FSArrayFile<V extends org.apache.hadoop.io.Writable>


Terrier 3.6. Copyright © 2004-2011 University of Glasgow