public interface BufferCall<C> extends OperationCall<C>
Buffer
invocation arguments.Modifier and Type | Method and Description |
---|---|
Iterator<TupleEntry> |
getArgumentsIterator()
Returns an
Iterator of TupleEntry instances representing the arguments for the called
Buffer.operate(cascading.flow.FlowProcess, BufferCall) method. |
Fields |
getDeclaredFields()
|
TupleEntry |
getGroup()
Returns the current grouping
TupleEntry . |
JoinerClosure |
getJoinerClosure()
Returns the current instance of a
JoinerClosure , if any. |
TupleEntryCollector |
getOutputCollector()
Returns the
TupleEntryCollector used to emit result values. |
boolean |
isRetainValues()
Returns
true if non-grouping fields will not be nulled after the argumentsIterator is completed. |
void |
setRetainValues(boolean retainValues)
Set to
false if at the end of all values iterated over in the argumentsIterator, the last seen argument tuple
values should not be nulled out. |
getArgumentFields, getContext, setContext
TupleEntry getGroup()
TupleEntry
.Iterator<TupleEntry> getArgumentsIterator()
Iterator
of TupleEntry
instances representing the arguments for the called
Buffer.operate(cascading.flow.FlowProcess, BufferCall)
method.
The return value may be null
if the previous CoGroup
declares
BufferJoin
as the Joiner
.
See getJoinerClosure()
.
Note that the returned TupleEntry should not be cached (stored in a Collection), nor should the underlying Tuple
instance. Where possible Cascading will re-use both TupleEntry and Tuple instances.
To get a safe copy that can be cached, use TupleEntry.getTupleCopy()
.Fields getDeclaredFields()
TupleEntryCollector getOutputCollector()
TupleEntryCollector
used to emit result values. Zero or more entries may be emitted.void setRetainValues(boolean retainValues)
false
if at the end of all values iterated over in the argumentsIterator, the last seen argument tuple
values should not be nulled out.
By default, if a result is emitted from the Buffer before and after the argumentsIterator is started or completed,
the last seen non-grouping values are null. When false, the values are not nulled after completion.
The default is true
.retainValues
- of type booleanboolean isRetainValues()
true
if non-grouping fields will not be nulled after the argumentsIterator is completed.JoinerClosure getJoinerClosure()
JoinerClosure
, if any. This allows a Buffer to implement its own join
strategy against the incoming tuple streams.
The return value is always null
unless the declared fields on the CoGroup
are
Fields.NONE
.
Note this method is provided as a means to bypass some of the Cascading internals in order to improve the
implementations (performance or maintainability) behind some algorithms.
Consider it only if you are an advanced user. Or more robustly, consider implementing a custom
Joiner
.Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.