public class StreamAuditStorageWriter.AuditStorageLogWriterComputation extends AbstractComputation
| Modifier and Type | Field and Description |
|---|---|
protected int |
batchSize |
protected int |
batchThresholdMs |
protected List<String> |
jsonEntries |
| Constructor and Description |
|---|
AuditStorageLogWriterComputation(String name,
int batchSize,
int batchThresholdMs) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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). |
protected void |
writeJsonEntriesToAudit(ComputationContext context)
Store JSON entries in the Directory Audit Storage
|
metadata, processFailure, processRetryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsignalStopprotected final int batchSize
protected final int batchThresholdMs
protected final List<String> jsonEntries
public AuditStorageLogWriterComputation(String name, int batchSize, int batchThresholdMs)
public void init(ComputationContext context)
Computationinit in interface Computationinit in class AbstractComputationcontext - The computation context object provided by the system.public void processTimer(ComputationContext context, String key, long timestamp)
ComputationComputationContext.setTimer(String, long).processTimer in interface ComputationprocessTimer in class AbstractComputationcontext - 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 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 void destroy()
Computationprotected void writeJsonEntriesToAudit(ComputationContext context)
Copyright © 2019 Nuxeo. All rights reserved.