public abstract class AbstractComputation extends Object implements Computation
Computation
that manages the metadata init. The inputs streams are named i1, i2 ... The output
streams are named o1, o2 ...Modifier and Type | Field and Description |
---|---|
protected ComputationMetadata |
metadata |
Constructor and Description |
---|
AbstractComputation(String name,
int nbInputStreams,
int nbOutputStreams) |
Modifier and Type | Method and Description |
---|---|
void |
init(ComputationContext context)
Called when the framework has registered the computation successfully.
|
ComputationMetadata |
metadata()
Identify the computation.
|
void |
processTimer(ComputationContext context,
String key,
long timestamp)
Process a timer callback previously set via
ComputationContext.setTimer(String, long) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, processRecord
protected final ComputationMetadata metadata
public AbstractComputation(String name, int nbInputStreams, int nbOutputStreams)
public void init(ComputationContext context)
Computation
init
in interface Computation
context
- The computation context object provided by the system.public void processTimer(ComputationContext context, String key, long timestamp)
Computation
ComputationContext.setTimer(String, long)
.processTimer
in interface Computation
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.public ComputationMetadata metadata()
Computation
metadata
in interface Computation
Copyright © 2018 Nuxeo. All rights reserved.