public static final class ComputeFunction.Callback<K,VV,EV,Message> extends Object implements ComputeFunction.ReadWriteAggregators
Modifier and Type | Field and Description |
---|---|
protected Map<String,Map<K,?>> |
aggregators |
protected org.apache.kafka.streams.processor.ProcessorContext |
context |
protected org.apache.kafka.streams.state.TimestampedKeyValueStore<K,Map<K,EV>> |
edgesStore |
protected K |
key |
protected VV |
newVertexValue |
protected Map<K,List<Message>> |
outgoingMessages |
protected Map<String,?> |
previousAggregates |
protected boolean |
voteToHalt |
Constructor and Description |
---|
Callback(org.apache.kafka.streams.processor.ProcessorContext context,
K key,
org.apache.kafka.streams.state.TimestampedKeyValueStore<K,Map<K,EV>> edgesStore,
Map<String,?> previousAggregates,
Map<String,Map<K,?>> aggregators) |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(K target,
EV value) |
<T> void |
aggregate(String name,
T value) |
<T> T |
getAggregatedValue(String name) |
void |
removeEdge(K target) |
void |
sendMessageTo(K target,
Message m) |
void |
setNewEdgeValue(K target,
EV value) |
void |
setNewVertexValue(VV vertexValue) |
void |
voteToHalt() |
protected final org.apache.kafka.streams.processor.ProcessorContext context
protected final K key
protected final org.apache.kafka.streams.state.TimestampedKeyValueStore<K,Map<K,EV>> edgesStore
protected VV newVertexValue
protected boolean voteToHalt
public final void setNewVertexValue(VV vertexValue)
public final void removeEdge(K target)
public void voteToHalt()
public final <T> T getAggregatedValue(String name)
getAggregatedValue
in interface ComputeFunction.ReadAggregators
public final <T> void aggregate(String name, T value)
aggregate
in interface ComputeFunction.ReadWriteAggregators
Copyright © 2020. All rights reserved.