public class WorkComputation extends AbstractComputation
| Modifier and Type | Field and Description | 
|---|---|
protected static int | 
IDS_SIZE  | 
protected long | 
stateTTL  | 
protected Work | 
work  | 
protected org.apache.commons.collections.buffer.CircularFifoBuffer | 
workIds  | 
protected com.codahale.metrics.Timer | 
workTimer  | 
| 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)  | 
void | 
signalStop()
A hook to inform that computation will be soon destroyed. 
 | 
init, metadata, processFailure, processRetry, processTimerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroyprotected static final int IDS_SIZE
protected final org.apache.commons.collections.buffer.CircularFifoBuffer workIds
protected final com.codahale.metrics.Timer workTimer
protected final long stateTTL
public WorkComputation(String name)
public void signalStop()
Computationpublic void processRecord(ComputationContext context, String inputStreamName, Record record)
Computationcontext - 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 © 2019 Nuxeo. All rights reserved.