use of com.twitter.distributedlog.service.stream.BulkWriteOp in project distributedlog by twitter.
the class DistributedLogServiceImpl method writeBulkWithContext.
@Override
public Future<BulkWriteResponse> writeBulkWithContext(final String stream, List<ByteBuffer> data, WriteContext ctx) {
bulkWritePendingStat.inc();
receivedRecordCounter.add(data.size());
BulkWriteOp op = new BulkWriteOp(stream, data, statsLogger, perStreamStatsLogger, getChecksum(ctx), featureChecksumDisabled, accessControlManager);
executeStreamOp(op);
return op.result().ensure(new Function0<BoxedUnit>() {
public BoxedUnit apply() {
bulkWritePendingStat.dec();
return null;
}
});
}
Aggregations