cascading.scheme

## Class NullScheme<Config,Input,Output,SourceContext,SinkContext>

- java.lang.Object
- - cascading.scheme.Scheme<Config,Input,Output,SourceContext,SinkContext>
  - - cascading.scheme.NullScheme<Config,Input,Output,SourceContext,SinkContext>

- All Implemented Interfaces:
    Traceable, Serializable

      public class NullScheme<Config,Input,Output,SourceContext,SinkContext>
      extends Scheme<Config,Input,Output,SourceContext,SinkContext>

  Class NullScheme is a `Scheme` that neither reads or writes any values.

  It is typically used as a placeholder where a Scheme instance is needed but generally ignored.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NullScheme()`
    `NullScheme(Fields sourceFields, Fields sinkFields)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `sink(FlowProcess<? extends Config> flowProcess, SinkCall<SinkContext,Output> sinkCall)` Method sink writes out the given `Tuple` found on `SinkCall.getOutgoingEntry()` to the `SinkCall.getOutput()`.
    `void` | `sinkConfInit(FlowProcess<? extends Config> flowProcess, Tap<Config,Input,Output> tap, Config conf)` Method sinkInit initializes this instance as a sink.
    `boolean` | `source(FlowProcess<? extends Config> flowProcess, SourceCall<SourceContext,Input> sourceCall)` Method source will read a new "record" or value from `SourceCall.getInput()` and populate the available `Tuple` via `SourceCall.getIncomingEntry()` and return `true` on success or `false` if no more values available.
    `void` | `sourceConfInit(FlowProcess<? extends Config> flowProcess, Tap<Config,Input,Output> tap, Config conf)` Method sourceInit initializes this instance as a source.
    `String` | `toString()`

    - ### Methods inherited from class cascading.scheme.Scheme

      `equals, getNumSinkParts, getSinkFields, getSourceFields, getTrace, hashCode, isSink, isSource, isSymmetrical, presentSinkFields, presentSinkFieldsInternal, presentSourceFields, presentSourceFieldsInternal, retrieveSinkFields, retrieveSourceFields, setNumSinkParts, setSinkFields, setSourceFields, sinkCleanup, sinkPrepare, sourceCleanup, sourcePrepare`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NullScheme

          public NullScheme()

    - #### NullScheme

          public NullScheme(Fields sourceFields,
                    Fields sinkFields)

  - ### Method Detail

    - #### sourceConfInit

          public void sourceConfInit(FlowProcess<? extends Config> flowProcess,
                            Tap<Config,Input,Output> tap,
                            Config conf)

      Description copied from class: `Scheme`
      Method sourceInit initializes this instance as a source.

      This method is executed client side as a means to provide necessary configuration parameters used by the underlying platform.

      It is not intended to initialize resources that would be necessary during the execution of this class, like a "formatter" or "parser".

      See `Scheme.sourcePrepare(cascading.flow.FlowProcess, SourceCall)` if resources much be initialized before use. And `Scheme.sourceCleanup(cascading.flow.FlowProcess, SourceCall)` if resources must be destroyed after use.
      Specified by:
        `sourceConfInit` in class `Scheme<Config,Input,Output,SourceContext,SinkContext>`
      Parameters:
        `flowProcess` - of type FlowProcess
        `tap` - of type Tap
        `conf` - of type Config

    - #### sinkConfInit

          public void sinkConfInit(FlowProcess<? extends Config> flowProcess,
                          Tap<Config,Input,Output> tap,
                          Config conf)

      Description copied from class: `Scheme`
      Method sinkInit initializes this instance as a sink.

      This method is executed client side as a means to provide necessary configuration parameters used by the underlying platform.

      It is not intended to initialize resources that would be necessary during the execution of this class, like a "formatter" or "parser".

      See `Scheme.sinkPrepare(cascading.flow.FlowProcess, SinkCall)` if resources much be initialized before use. And `Scheme.sinkCleanup(cascading.flow.FlowProcess, SinkCall)` if resources must be destroyed after use.
      Specified by:
        `sinkConfInit` in class `Scheme<Config,Input,Output,SourceContext,SinkContext>`
      Parameters:
        `flowProcess` - of type FlowProcess
        `tap` - of type Tap
        `conf` - of type Config

    - #### source

          public boolean source(FlowProcess<? extends Config> flowProcess,
                       SourceCall<SourceContext,Input> sourceCall)
                         throws IOException

      Description copied from class: `Scheme`
      Method source will read a new "record" or value from `SourceCall.getInput()` and populate the available `Tuple` via `SourceCall.getIncomingEntry()` and return `true` on success or `false` if no more values available.

      It's ok to set a new Tuple instance on the `incomingEntry` `TupleEntry`, or to simply re-use the existing instance.

      Note this is only time it is safe to modify a Tuple instance handed over via a method call.

      This method may optionally throw a `TapException` if it cannot process a particular instance of data. If the payload Tuple is set on the TapException, that Tuple will be written to any applicable failure trap Tap.
      Specified by:
        `source` in class `Scheme<Config,Input,Output,SourceContext,SinkContext>`
      Parameters:
        `flowProcess` - of type FlowProcess
        `sourceCall` - of SourceCall
      Returns:
        returns `true` when a Tuple was successfully read
      Throws:
        `IOException`

    - #### sink

          public void sink(FlowProcess<? extends Config> flowProcess,
                  SinkCall<SinkContext,Output> sinkCall)
                    throws IOException

      Description copied from class: `Scheme`
      Method sink writes out the given `Tuple` found on `SinkCall.getOutgoingEntry()` to the `SinkCall.getOutput()`.

      This method may optionally throw a `TapException` if it cannot process a particular instance of data. If the payload Tuple is set on the TapException, that Tuple will be written to any applicable failure trap Tap. If not set, the incoming Tuple will be written instead.
      Specified by:
        `sink` in class `Scheme<Config,Input,Output,SourceContext,SinkContext>`
      Parameters:
        `flowProcess` - of Process
        `sinkCall` - of SinkCall
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Scheme<Config,Input,Output,SourceContext,SinkContext>`

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