public interface Computation
Modifier and Type | Method and Description |
---|---|
default void |
destroy()
Called when the framework is ready to shutdown the computation.
|
void |
init(ComputationContext context)
Called when the framework has registered the computation successfully.
|
ComputationMetadata |
metadata()
Identify the computation.
|
void |
processRecord(ComputationContext context,
String inputStreamName,
Record record)
Process an incoming record on one of the computation's input streams.
|
void |
processTimer(ComputationContext context,
String key,
long timestamp)
Process a timer callback previously set via
ComputationContext.setTimer(String, long) . |
void init(ComputationContext context)
context
- The computation context object provided by the system.default void destroy()
void processRecord(ComputationContext context, String inputStreamName, Record record)
context
- The computation context object provided by the system.inputStreamName
- Name of the input stream that provides the record.record
- The record.void processTimer(ComputationContext context, String key, long timestamp)
ComputationContext.setTimer(String, long)
.context
- The computation context object provided by the system.key
- The name of the timer.timestamp
- The timestamp (in ms) for which the callback was scheduled.ComputationMetadata metadata()
Copyright © 2018 Nuxeo. All rights reserved.