cascading.tuple.collect

## Class SpillableTupleList

- java.lang.Object
- - cascading.tuple.collect.SpillableTupleList

All Implemented Interfaces:
  Spillable, java.lang.Iterable<Tuple>, java.util.Collection<Tuple>

Direct Known Subclasses:
  HadoopSpillableTupleList

    public abstract class SpillableTupleList
    extends java.lang.Object
    implements java.util.Collection<Tuple>, Spillable

Class SpillableTupleList is a simple durable Collection that can spill its contents to disk when the `threshold` is met.

Using a `threshold` of -1 will disable the spill, all values will remain in memory. <p.></p.> This class is used by the `CoGroup` pipe, to set properties specific to a given CoGroup instance, see the `Pipe.getConfigDef()` method.

Use the `SpillableProps` fluent helper class to set properties.

See Also:
  `HadoopSpillableTupleList`

### Nested Class Summary

### Nested classes/interfaces inherited from interface cascading.tuple.collect.Spillable

`Spillable.SpillListener, Spillable.SpillStrategy`

### Constructor Summary

Constructors
`protected` `SpillableTupleList(int threshold)`
`protected` `SpillableTupleList(Spillable.SpillStrategy spillStrategy)`

### Method Summary

Methods
`boolean` `add(Tuple tuple)` Method add will add the given `Tuple` to this list.
`boolean` `addAll(java.util.Collection<? extends Tuple> tuples)`
`void` `clear()`
`boolean` `contains(java.lang.Object object)`
`boolean` `containsAll(java.util.Collection<?> objects)`
`protected abstract TupleInputStream` `createTupleInputStream(java.io.File file)`
`protected abstract TupleOutputStream` `createTupleOutputStream(java.io.File file)`
`protected static java.lang.Class` `getCodecClass(FlowProcess flowProcess, java.lang.String defaultCodecs, java.lang.Class subClass)`
`Tuple` `getGrouping()`
`static int` `getThreshold(FlowProcess flowProcess, int defaultValue)`
`boolean` `isEmpty()`
`java.util.Iterator<Tuple>` `iterator()`
`boolean` `remove(java.lang.Object object)`
`boolean` `removeAll(java.util.Collection<?> objects)`
`boolean` `retainAll(java.util.Collection<?> objects)`
`void` `setGrouping(Tuple group)`
`void` `setSpillListener(Spillable.SpillListener spillListener)`
`void` `setSpillStrategy(Spillable.SpillStrategy spillStrategy)`
`int` `size()`
`int` `spillCount()` The number of times this container has spilled data to disk.
`java.lang.Object[]` `toArray()`
`<T> T[]` `toArray(T[] ts)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Collection

`equals, hashCode`

### Constructor Detail

#### SpillableTupleList

    protected SpillableTupleList(int threshold)

#### SpillableTupleList

    protected SpillableTupleList(Spillable.SpillStrategy spillStrategy)

### Method Detail

#### getThreshold

    public static int getThreshold(FlowProcess flowProcess,
                   int defaultValue)

#### getCodecClass

    protected static java.lang.Class getCodecClass(FlowProcess flowProcess,
                                java.lang.String defaultCodecs,
                                java.lang.Class subClass)

#### setGrouping

    public void setGrouping(Tuple group)

Specified by:
  `setGrouping` in interface `Spillable`

#### getGrouping

    public Tuple getGrouping()

Specified by:
  `getGrouping` in interface `Spillable`

#### setSpillStrategy

    public void setSpillStrategy(Spillable.SpillStrategy spillStrategy)

Specified by:
  `setSpillStrategy` in interface `Spillable`

#### setSpillListener

    public void setSpillListener(Spillable.SpillListener spillListener)

Specified by:
  `setSpillListener` in interface `Spillable`

#### spillCount

    public int spillCount()

Description copied from interface: `Spillable`
The number of times this container has spilled data to disk.

Specified by:
  `spillCount` in interface `Spillable`
Returns:
  in int

#### add

    public boolean add(Tuple tuple)

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

Specified by:
  `add` in interface `java.util.Collection<Tuple>`
Parameters:
  `tuple` - of type Tuple

#### size

    public int size()

Specified by:
  `size` in interface `java.util.Collection<Tuple>`

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `java.util.Collection<Tuple>`

#### createTupleOutputStream

    protected abstract TupleOutputStream createTupleOutputStream(java.io.File file)

#### createTupleInputStream

    protected abstract TupleInputStream createTupleInputStream(java.io.File file)

#### clear

    public void clear()

Specified by:
  `clear` in interface `java.util.Collection<Tuple>`

#### iterator

    public java.util.Iterator<Tuple> iterator()

Specified by:
  `iterator` in interface `java.lang.Iterable<Tuple>`
Specified by:
  `iterator` in interface `java.util.Collection<Tuple>`

#### contains

    public boolean contains(java.lang.Object object)

Specified by:
  `contains` in interface `java.util.Collection<Tuple>`

#### toArray

    public java.lang.Object[] toArray()

Specified by:
  `toArray` in interface `java.util.Collection<Tuple>`

#### toArray

    public <T> T[] toArray(T[] ts)

Specified by:
  `toArray` in interface `java.util.Collection<Tuple>`

#### remove

    public boolean remove(java.lang.Object object)

Specified by:
  `remove` in interface `java.util.Collection<Tuple>`

#### containsAll

    public boolean containsAll(java.util.Collection<?> objects)

Specified by:
  `containsAll` in interface `java.util.Collection<Tuple>`

#### addAll

    public boolean addAll(java.util.Collection<? extends Tuple> tuples)

Specified by:
  `addAll` in interface `java.util.Collection<Tuple>`

#### removeAll

    public boolean removeAll(java.util.Collection<?> objects)

Specified by:
  `removeAll` in interface `java.util.Collection<Tuple>`

#### retainAll

    public boolean retainAll(java.util.Collection<?> objects)

Specified by:
  `retainAll` in interface `java.util.Collection<Tuple>`