## cascading.tuple
Class SpillableTupleList

    java.lang.Object
      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.
`SpillableTupleList(long threshold, JobConf conf, CompressionCodec codec)` Constructor SpillableTupleList creates a new SpillableTupleList instance using the given threshold value, and the first available compression codec, if any.
`SpillableTupleList(long threshold, JobConf conf, CompressionCodec codec, FlowProcess flowProcess)`

Method Summary
`boolean` `add(Tuple tuple)` Method add will add the given `Tuple` to this list.
`boolean` `add(TupleEntry tupleEntry)` Method add the given `TupleEntry` to this list.
`void` `clear()` Method clear empties this container so it may be re-used.
`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.
`boolean` `isEmpty()` Method isEmpty returns true if this list is empty
`Iterator<Tuple>` `iterator()` Method iterator returns a Tuple Iterator of all the values in this collection.
`void` `setIterator(IndexTuple current, Iterator values)`
`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

### SpillableTupleList

    public SpillableTupleList(long threshold,
                              JobConf conf,
                              CompressionCodec codec)

  Constructor SpillableTupleList creates a new SpillableTupleList instance using the given threshold value, and the first available compression codec, if any.

  Parameters:
    `threshold` - of type long
    `conf` -
    `codec` - of type CompressionCodec

### SpillableTupleList

    public SpillableTupleList(long threshold,
                              JobConf conf,
                              CompressionCodec codec,
                              FlowProcess flowProcess)

Method Detail

### add

    public boolean add(Tuple tuple)

  Method add will add the given `Tuple` to this list.

  Parameters:
    `tuple` - of type Tuple

### add

    public boolean 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

### isEmpty

    public boolean isEmpty()

  Method isEmpty returns true if this list is empty

  Returns:
    the empty (type boolean) of this SpillableTupleList object.

### 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.

### clear

    public void clear()

  Method clear empties this container so it may be re-used.

### setIterator

    public void setIterator(IndexTuple current,
                            Iterator values)

### 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<Tuple>

### entryIterator

    public Iterator<TupleEntry> entryIterator()

  Method entryIterator returns a TupleEntry Iterator of all the alues in this collection.

  Returns:
    Iterator<TupleEntry>

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