in analytics-kotlin/src/main/kotlin/services/timestream/TimestreamSink.kt [59:70]
override fun invoke(value: Collection<TimestreamPoint>) {
bufferedRecords.addAll(createRecords(value))
if (shouldPublish()) {
while (!bufferedRecords.isEmpty()) {
val recordsToSend: MutableList<Record> = ArrayList(batchSize)
bufferedRecords.drainTo(recordsToSend, batchSize)
writeBatch(recordsToSend)
}
}
}