cascading.tuple
Class SpillableTupleList

java.lang.Object
  extended by cascading.tuple.SpillableTupleList
All Implemented Interfaces:
Iterable<Tuple>

public class SpillableTupleList
extends Object
implements Iterable<Tuple>

SpillableTupleList is a simple Iterable object that can store an unlimited number of Tuple instances by spilling excess to a temporary disk file.


Constructor Summary
SpillableTupleList()
          Constructor SpillableTupleList creates a new SpillableTupleList instance.
SpillableTupleList(long threshold)
          Constructor SpillableTupleList creates a new SpillableTupleList instance using the given threshold value.
 
Method Summary
 void add(Tuple tuple)
          Method add will add the given Tuple to this list.
 void add(TupleEntry tupleEntry)
          Method add the given TupleEntry to this list.
 Iterator<TupleEntry> entryIterator()
          Method entryIterator returns a TupleEntry Iterator of all the alues in this collection.
 int getNumFiles()
          Method getNumFiles returns the number of files this list has spilled to.
 Iterator<Tuple> iterator()
          Method iterator returns a Tuple Iterator of all the values in this collection.
 long size()
          Method size returns the size of this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpillableTupleList

public SpillableTupleList()
Constructor SpillableTupleList creates a new SpillableTupleList instance.


SpillableTupleList

public SpillableTupleList(long threshold)
Constructor SpillableTupleList creates a new SpillableTupleList instance using the given threshold value.

Parameters:
threshold - of type long
Method Detail

add

public void add(Tuple tuple)
Method add will add the given Tuple to this list.

Parameters:
tuple - of type Tuple

add

public void add(TupleEntry tupleEntry)
Method add the given TupleEntry to this list. All TupleEntry instances added must declare the same Fields.

Parameters:
tupleEntry - of type TupleEntry

size

public long size()
Method size returns the size of this list.

Returns:
long

getNumFiles

public int getNumFiles()
Method getNumFiles returns the number of files this list has spilled to.

Returns:
the numFiles (type int) of this SpillableTupleList object.

iterator

public Iterator<Tuple> iterator()
Method iterator returns a Tuple Iterator of all the values in this collection.

Specified by:
iterator in interface Iterable<Tuple>
Returns:
Iterator

entryIterator

public Iterator<TupleEntry> entryIterator()
Method entryIterator returns a TupleEntry Iterator of all the alues in this collection.

Returns:
Iterator


Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.