cascading.scheme
Class ConcreteCall<Context,IO>

java.lang.Object
  extended by cascading.scheme.ConcreteCall<Context,IO>
Type Parameters:
Context -
IO -
All Implemented Interfaces:
SinkCall<Context,IO>, SourceCall<Context,IO>

public class ConcreteCall<Context,IO>
extends Object
implements SourceCall<Context,IO>, SinkCall<Context,IO>

The concrete base class for SourceCall and SinkCall.


Constructor Summary
ConcreteCall()
           
 
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 SourceCall.getInput().
 IO getInput()
          Method getInput returns the input mechanism for the underlying platform used to retrieve new values (records, lines, etc).
 TupleEntry getOutgoingEntry()
          Method getOutgoingEntry returns the final TupleEntry to be passed to the SinkCall.getOutput() output handler.
 IO getOutput()
           
 void setContext(Context context)
          Method setContext sets the context of this SourceCall object.
 void setIncomingEntry(TupleEntry incomingEntry)
           
 void setInput(IO input)
           
 void setOutgoingEntry(TupleEntry outgoingEntry)
           
 void setOutput(IO output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcreteCall

public ConcreteCall()
Method Detail

getContext

public Context getContext()
Description copied from interface: SourceCall
Method getContext returns the context of this SourceCall object.

Specified by:
getContext in interface SinkCall<Context,IO>
Specified by:
getContext in interface SourceCall<Context,IO>
Returns:
the context (type C) of this SourceCall object.

setContext

public void setContext(Context context)
Description copied from interface: SourceCall
Method setContext sets the context of this SourceCall object.

Specified by:
setContext in interface SinkCall<Context,IO>
Specified by:
setContext in interface SourceCall<Context,IO>
Parameters:
context - the context of this SourceCall object.

getOutgoingEntry

public TupleEntry getOutgoingEntry()
Description copied from interface: SinkCall
Method getOutgoingEntry returns the final TupleEntry to be passed to the SinkCall.getOutput() output handler.

That is, the result of calling getOutgoingEntry() should be passed directly to the platform specific output handler returned by getOutput().

Note the returned value from this method cannot be modified.

Specified by:
getOutgoingEntry in interface SinkCall<Context,IO>
Returns:
TupleEntry

setOutgoingEntry

public void setOutgoingEntry(TupleEntry outgoingEntry)

getIncomingEntry

public TupleEntry getIncomingEntry()
Description copied from interface: SourceCall
Method getIncomingEntry returns a pre-prepared TupleEntry to be populated with the input values from SourceCall.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.

Specified by:
getIncomingEntry in interface SourceCall<Context,IO>
Returns:
TupleEntry

setIncomingEntry

public void setIncomingEntry(TupleEntry incomingEntry)

getInput

public IO getInput()
Description copied from interface: SourceCall
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.

Specified by:
getInput in interface SourceCall<Context,IO>
Returns:
the platform dependent input handler

setInput

public void setInput(IO input)

getOutput

public IO getOutput()
Specified by:
getOutput in interface SinkCall<Context,IO>

setOutput

public void setOutput(IO output)


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