Add actual kinesis datastreams client#3191
Conversation
…s-datastreams-client-actual-client
mattcreaser
left a comment
There was a problem hiding this comment.
Various thoughts below but none of them are blocking.
|
|
||
| private const val DEFAULT_CACHE_SIZE_LIMIT_IN_BYTES = 500L * 1024 * 1024 | ||
|
|
||
| data class KinesisDataStreamsOptions internal constructor( |
There was a problem hiding this comment.
Will need kdoc on all the public APIs. This can be done in a subsequent PR.
| logger.info("Starting flush") | ||
| return logOp( | ||
| operation = { recordClient.flush() }, | ||
| logSuccess = { data, timeMs -> logger.info("Flush completed successfully in ${timeMs}ms - ${data.recordsFlushed} records flushed") }, |
There was a problem hiding this comment.
For non-constant log messages please use the lazy evaluation versions (e.g. logger.info { "..." })
There was a problem hiding this comment.
Good catch, we'll rework logging in a follow up.
aws-kinesis/src/main/java/com/amplifyframework/kinesis/KinesisRecordSender.kt
Show resolved
Hide resolved
aws-kinesis/src/main/java/com/amplifyframework/kinesis/KinesisRecordSender.kt
Show resolved
Hide resolved
| import com.amplifyframework.AmplifyException | ||
| import com.amplifyframework.recordcache.RecordCacheException | ||
|
|
||
| class KinesisException( |
There was a problem hiding this comment.
To discuss later: using sealed exception hierarchy for better discoverability
| import com.amplifyframework.recordcache.SQLiteRecordStorage | ||
| import kotlin.system.measureTimeMillis | ||
|
|
||
| class KinesisDataStreams( |
There was a problem hiding this comment.
I can see this is what what proposed in the API review but let's revisit this class name prior to release to ensure it aligns with how we are thinking about things for vNext.
Issue #, if available:
Description of changes:
How did you test these changes?
(Please add a line here how the changes were tested)
Documentation update required?
General Checklist
fix(storage): message,feat(auth): message,chore(all): message)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.