public interface ProcessorContext
Modifier and Type | Method and Description |
---|---|
void |
commit()
Requests a commit
|
<K,V> void |
forward(K key,
V value)
Forwards a key/value pair to the downstream processors
|
<K,V> void |
forward(K key,
V value,
int childIndex)
Forwards a key/value pair to one of the downstream processors designated by childIndex
|
StateStore |
getStateStore(java.lang.String name)
Get the state store given the store name.
|
java.lang.String |
jobId()
Returns the job id
|
org.apache.kafka.common.serialization.Deserializer<?> |
keyDeserializer()
Returns the key deserializer
|
org.apache.kafka.common.serialization.Serializer<?> |
keySerializer()
Returns the key serializer
|
StreamsMetrics |
metrics()
Returns Metrics instance
|
long |
offset()
Returns the offset of the current input record
|
int |
partition()
Returns the partition id of the current input record
|
void |
register(StateStore store,
boolean loggingEnabled,
StateRestoreCallback stateRestoreCallback)
Registers and possibly restores the specified storage engine.
|
void |
schedule(long interval)
Schedules a periodic operation for processors.
|
java.io.File |
stateDir()
Returns the state directory for the partition.
|
TaskId |
taskId()
Returns the task id
|
long |
timestamp()
Returns the timestamp of the current input record.
|
java.lang.String |
topic()
Returns the topic name of the current input record
|
org.apache.kafka.common.serialization.Deserializer<?> |
valueDeserializer()
Returns the value deserializer
|
org.apache.kafka.common.serialization.Serializer<?> |
valueSerializer()
Returns the value serializer
|
java.lang.String jobId()
TaskId taskId()
org.apache.kafka.common.serialization.Serializer<?> keySerializer()
org.apache.kafka.common.serialization.Serializer<?> valueSerializer()
org.apache.kafka.common.serialization.Deserializer<?> keyDeserializer()
org.apache.kafka.common.serialization.Deserializer<?> valueDeserializer()
java.io.File stateDir()
StreamsMetrics metrics()
void register(StateStore store, boolean loggingEnabled, StateRestoreCallback stateRestoreCallback)
store
- the storage engineStateStore getStateStore(java.lang.String name)
name
- The store namevoid schedule(long interval)
initialization
to
schedule a periodic call called a punctuation to Processor.punctuate(long)
.interval
- the time interval between punctuations<K,V> void forward(K key, V value)
key
- keyvalue
- value<K,V> void forward(K key, V value, int childIndex)
key
- keyvalue
- valuevoid commit()
java.lang.String topic()
int partition()
long offset()
long timestamp()
ConsumerRecord
by TimestampExtractor
.