public abstract class MemorySpliceGate extends SpliceGate
Modifier and Type | Class and Description |
---|---|
protected class |
MemorySpliceGate.DelegatedTuple |
SpliceGate.Role
Modifier and Type | Field and Description |
---|---|
protected MemoryCoGroupClosure |
closure |
protected java.util.concurrent.atomic.AtomicInteger |
count |
protected java.util.Comparator<Tuple>[] |
groupComparators |
protected TupleHasher |
groupHasher |
protected java.util.Set<Tuple> |
keys |
protected java.util.Map<Tuple,java.util.Collection<Tuple>>[] |
keyValues |
protected boolean |
nullsAreNotEqual |
protected int |
numIncomingPaths |
protected java.util.Map<Duct,java.lang.Integer> |
posMap |
protected java.util.Comparator<Tuple>[] |
valueComparators |
flowProcess, grouping, incomingScopes, keyBuilder, keyEntry, keyFields, orderedPrevious, outgoingScopes, role, sortBuilder, sortFields, splice, tupleEntryIterator, valuesBuilder, valuesFields
allPrevious
Constructor and Description |
---|
MemorySpliceGate(FlowProcess flowProcess,
Splice splice) |
Modifier and Type | Method and Description |
---|---|
void |
bind(StreamGraph streamGraph) |
protected TupleBuilder |
createDefaultNarrowBuilder(Fields incomingFields,
Fields narrowFields) |
protected java.util.Set<Tuple> |
createKeySet() |
protected java.util.Map<Tuple,java.util.Collection<Tuple>>[] |
createKeyValuesArray()
This lets us just replace an old map and let the gc cleanup, vs clearing each map
|
protected java.util.Map<Tuple,java.util.Collection<Tuple>> |
createTupleMap() |
protected Tuple |
getDelegatedTuple(Tuple object)
This allows the tuple to honor the hasher and comparators, if any
|
protected java.util.Comparator |
getKeyComparator() |
void |
initialize()
Called immediately after bind
|
protected abstract boolean |
isBlockingStreamed() |
void |
prepare() |
addIncomingScope, addOutgoingScope, cleanup, createNarrowBuilder, createNulledBuilder, equals, getBranchNames, getFlowElement, getIncomingScopes, getOutgoingScopes, handleException, handleReThrowableException, hashCode, hasTrapHandler, makePosMap, orderDucts, setBranchNames, setTrapHandler, toString
getAllPreviousFor
complete, getNext, getNextFor, receive, receiveFirst, start
protected final java.util.Map<Duct,java.lang.Integer> posMap
protected java.util.Comparator<Tuple>[] groupComparators
protected java.util.Comparator<Tuple>[] valueComparators
protected TupleHasher groupHasher
protected boolean nullsAreNotEqual
protected java.util.Set<Tuple> keys
protected MemoryCoGroupClosure closure
protected int numIncomingPaths
protected final java.util.concurrent.atomic.AtomicInteger count
public MemorySpliceGate(FlowProcess flowProcess, Splice splice)
public void bind(StreamGraph streamGraph)
bind
in class Gate<TupleEntry,Grouping<TupleEntry,TupleEntryIterator>>
protected TupleBuilder createDefaultNarrowBuilder(Fields incomingFields, Fields narrowFields)
createDefaultNarrowBuilder
in class SpliceGate
public void initialize()
Duct
initialize
in class SpliceGate
public void prepare()
prepare
in class Duct<TupleEntry,Grouping<TupleEntry,TupleEntryIterator>>
protected java.util.Comparator getKeyComparator()
protected java.util.Set<Tuple> createKeySet()
protected java.util.Map<Tuple,java.util.Collection<Tuple>>[] createKeyValuesArray()
protected final Tuple getDelegatedTuple(Tuple object)
object
- the tuple to wrapprotected abstract boolean isBlockingStreamed()