public class WorkComputation extends AbstractComputation
Modifier and Type | Field and Description |
---|---|
protected static int |
IDS_SIZE |
protected org.apache.commons.collections.buffer.CircularFifoBuffer |
workIds |
protected com.codahale.metrics.Timer |
workTimer |
metadata
Constructor and Description |
---|
WorkComputation(String name) |
Modifier and Type | Method and Description |
---|---|
static Work |
deserialize(byte[] data) |
void |
processRecord(ComputationContext context,
String inputStreamName,
Record record)
Process an incoming record on one of the computation's input streams.
|
static byte[] |
serialize(Work work) |
init, metadata, processTimer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy
protected static final int IDS_SIZE
protected final org.apache.commons.collections.buffer.CircularFifoBuffer workIds
protected final com.codahale.metrics.Timer workTimer
public WorkComputation(String name)
public void processRecord(ComputationContext context, String inputStreamName, Record record)
Computation
context
- The computation context object provided by the system.inputStreamName
- Name of the input stream that provides the record.record
- The record.public static Work deserialize(byte[] data)
Copyright © 2018 Nuxeo. All rights reserved.