public class BatchProcessor extends Object implements AutoCloseable
Constructor and Description |
---|
BatchProcessor(StreamLog streamLog,
long sealEpoch,
boolean sync)
Returns a new BatchProcessor for a stream log.
|
Modifier and Type | Method and Description |
---|---|
<T> CompletableFuture<T> |
addTask(BatchWriterOperation.Type type,
CorfuPayloadMsg msg)
Add a task to the processor.
|
void |
close() |
public BatchProcessor(StreamLog streamLog, long sealEpoch, boolean sync)
streamLog
- stream log for writes (can be in memory or file)sealEpoch
- All operations stamped with epoch less than the epochWaterMark are
discarded.streamLog
- the backing log (can be in memory or file)sync
- If true, the batch writer will sync writes to secondary storagepublic <T> CompletableFuture<T> addTask(@Nonnull BatchWriterOperation.Type type, @Nonnull CorfuPayloadMsg msg)
type
- The request typemsg
- The request messagepublic void close()
close
in interface AutoCloseable
Copyright © 2019 CorfuDB. All rights reserved.