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

    Fields inherited from class java.util.AbstractList

    modCount
  • Constructor Summary

    Constructors 
    Constructor Description
    FSArrayFileInMem​(java.lang.String filename, boolean updateable, FixedSizeWriteableFactory<V> factory)
    constructor
    FSArrayFileInMem​(IndexOnDisk index, java.lang.String structureName)  
  • Method Summary

    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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    parallelStream, removeIf, stream, toArray

    Methods inherited from interface java.lang.Iterable

    forEach

    Methods inherited from interface java.util.List

    addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
  • Constructor Details

    • 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 Details

    • get

      public V get​(int entryNumber)
      Specified by:
      get in interface java.util.List<V extends org.apache.hadoop.io.Writable>
      Overrides:
      get in class FSArrayFile<V extends org.apache.hadoop.io.Writable>