## cascading.tap
Class SinkTap<Config,Output>

    java.lang.Object
      cascading.tap.Tap<Config,Void,Output>
          cascading.tap.SinkTap<Config,Output>

All Implemented Interfaces:
  FlowElement, Traceable, Serializable

Direct Known Subclasses:
  BaseTemplateTap, MultiSinkTap

    public abstract class SinkTap<Config,Output>

extends Tap<Config,Void,Output>

Class SinkTap is an optional base class for sink only Taps.

Some `Tap` instances may only be sinks (as opposed to being a source). These types may subclass SinkTap for convenience or set `isSource()` to `false` in a custom Tap sub-class.

See Also:
  Serialized Form

Constructor Summary
`protected` `SinkTap()`
`protected` `SinkTap(Scheme<Config,?,Output,?,?> scheme)`
`protected` `SinkTap(Scheme<Config,?,Output,?,?> scheme, SinkMode sinkMode)`

Method Summary
`Fields` `getSourceFields()` Method getSourceFields returns the sourceFields of this Tap object.
`boolean` `isSource()` Method isSource returns true if this Tap instance can be used as a source.
`TupleEntryIterator` `openForRead(FlowProcess<Config> flowProcess, Void input)` Method openForRead opens the resource represented by this Tap instance for reading.
`void` `sourceConfInit(FlowProcess<Config> flowProcess, Config conf)` Method sourceConfInit initializes this instance as a source.

Methods inherited from class cascading.tap.Tap

`commitResource, createResource, createResource, deleteResource, deleteResource, equals, flowConfInit, getConfigDef, getFullIdentifier, getFullIdentifier, getIdentifier, getModifiedTime, getModifiedTime, getScheme, getSinkFields, getSinkMode, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasStepConfigDef, id, isEquivalentTo, isKeep, isReplace, isSink, isTemporary, isUpdate, openForRead, openForWrite, openForWrite, outgoingScopeFor, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, sinkConfInit, taps, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SinkTap

    protected SinkTap()

### SinkTap

    protected SinkTap(Scheme<Config,?,Output,?,?> scheme)

### SinkTap

    protected SinkTap(Scheme<Config,?,Output,?,?> scheme,
                      SinkMode sinkMode)

Method Detail

### getSourceFields

    public Fields getSourceFields()

  Description copied from class: `Tap`
  Method getSourceFields returns the sourceFields of this Tap object.

  Overrides:
    `getSourceFields` in class `Tap<Config,Void,Output>`
  Returns:
    the sourceFields (type Fields) of this Tap object.

### isSource

    public boolean isSource()

  Description copied from class: `Tap`
  Method isSource returns true if this Tap instance can be used as a source.

  Overrides:
    `isSource` in class `Tap<Config,Void,Output>`
  Returns:
    boolean

### sourceConfInit

    public void sourceConfInit(FlowProcess<Config> flowProcess,
                               Config conf)

  Description copied from class: `Tap`
  Method sourceConfInit initializes this instance as a source.

  This method maybe called more than once if this Tap instance is used outside the scope of a `Flow` instance or if it participates in multiple times in a given Flow or across different Flows in a `Cascade`.

  In the context of a Flow, it will be called after `FlowListener.onStarting(cascading.flow.Flow)`

  Note that no resources or services should be modified by this method.

  Overrides:
    `sourceConfInit` in class `Tap<Config,Void,Output>`
  Parameters:
    `flowProcess` - of type FlowProcess
    `conf` - of type Config

### openForRead

    public TupleEntryIterator openForRead(FlowProcess<Config> flowProcess,
                                          Void input)
                                   throws IOException

  Description copied from class: `Tap`
  Method openForRead opens the resource represented by this Tap instance for reading.

  `input` value may be null, if so, sub-classes must inquire with the underlying `Scheme` via `Scheme.sourceConfInit(cascading.flow.FlowProcess, Tap, Object)` to get the proper input type and instantiate it before calling `super.openForRead()`.

  Note the returned iterator will return the same instance of `TupleEntry` on every call, thus a copy must be made of either the TupleEntry or the underlying `Tuple` instance if they are to be stored in a Collection.

  Specified by:
    `openForRead` in class `Tap<Config,Void,Output>`
  Parameters:
    `flowProcess` - of type FlowProcess
    `input` - of type Input
  Returns:
    TupleEntryIterator
  Throws:
    `IOException` - when the resource cannot be opened

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