org.apache.pig.data
Class FileList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<File>
              extended by org.apache.pig.data.FileList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<File>, Collection<File>, List<File>, RandomAccess

public class FileList
extends ArrayList<File>

This class extends ArrayList to add a finalize() that calls delete on the files . This helps in getting rid of the finalize() in the classes such as DefaultAbstractBag, and they can be freed up without waiting for finalize to be called. Only if those classes have spilled to disk, there will be a (this) class that needs to be finalized. CAUTION: if you assign a new value for a variable of this type, the files (if any) in the old object it pointed to will be scheduled for deletion. To avoid that call .clear() before assigning a new value.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FileList()
           
FileList(int i)
           
FileList(LinkedList<File> ll)
           
 
Method Summary
protected  void finalize()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

FileList

public FileList(int i)

FileList

public FileList()

FileList

public FileList(LinkedList<File> ll)
Method Detail

finalize

protected void finalize()
Overrides:
finalize in class Object


Copyright © 2007-2012 The Apache Software Foundation