in src/main/java/com/aliyun/openservices/aliyun/log/producer/internals/ProducerBatch.java [77:89]
public ListenableFuture<Result> tryAppend(
List<LogItem> items, int sizeInBytes, Callback callback) {
if (!hasRoomFor(sizeInBytes, items.size())) {
return null;
} else {
SettableFuture<Result> future = SettableFuture.create();
logItems.addAll(items);
thunks.add(new Thunk(callback, future));
curBatchCount += items.size();
curBatchSizeInBytes += sizeInBytes;
return future;
}
}