cascading.scheme
Interface SourceCall<Context,Input>

Type Parameters:
Context -
Input -
All Known Implementing Classes:
ConcreteCall

public interface SourceCall<Context,Input>

SourceCall provides access to the current Scheme.source(cascading.flow.FlowProcess, SourceCall) invocation arguments.

Use the Context to store thread local values.


Method Summary
 Context getContext()
          Method getContext returns the context of this SourceCall object.
 TupleEntry getIncomingEntry()
          Method getIncomingEntry returns a pre-prepared TupleEntry to be populated with the input values from getInput().
 Input getInput()
          Method getInput returns the input mechanism for the underlying platform used to retrieve new values (records, lines, etc).
 void setContext(Context context)
          Method setContext sets the context of this SourceCall object.
 

Method Detail

getContext

Context getContext()
Method getContext returns the context of this SourceCall object.

Returns:
the context (type C) of this SourceCall object.

setContext

void setContext(Context context)
Method setContext sets the context of this SourceCall object.

Parameters:
context - the context of this SourceCall object.

getIncomingEntry

TupleEntry getIncomingEntry()
Method getIncomingEntry returns a pre-prepared TupleEntry to be populated with the input values from getInput().

That is, using the getInput() method, retrieve the current incoming values and place them into the getIncomingEntry() via TupleEntry.setTuple(cascading.tuple.Tuple) or by modifying the tuple returned from TupleEntry.getTuple().

The returned Tuple entry is guaranteed to be the size of the declared incoming source fields.

The returned TupleEntry from this method is modifiable and is intended to be re-used. This is an exception to the general rule that passed TupleEntry instances must not be modified.

Returns:
TupleEntry

getInput

Input getInput()
Method getInput returns the input mechanism for the underlying platform used to retrieve new values (records, lines, etc).

Do not cache the returned value as it may change.

Returns:
the platform dependent input handler


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