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