T - the object to be sentpublic abstract class AbstractKinesisWriter<T> extends Object implements IVolumeWriter<T>
IKinesisClientProvider| Modifier | Constructor and Description |
|---|---|
protected |
AbstractKinesisWriter(int capacity,
String streamName,
IKinesisClientProvider kinesisClientProvider)
Create an instance of Kinesis Writer
|
| Modifier and Type | Method and Description |
|---|---|
static com.amazonaws.services.kinesis.AmazonKinesis |
buildCredentials(String accessKey,
String secretKey,
com.amazonaws.regions.Regions region)
Create
AmazonKinesis object with specified credentials |
protected abstract byte[] |
toBytes(T data)
Convert data object to byte array for send
|
boolean |
write(T data)
Writes the data
|
protected AbstractKinesisWriter(int capacity,
String streamName,
IKinesisClientProvider kinesisClientProvider)
capacity - the maximum record sizestreamName - the Kinesis stream name to send datakinesisClientProvider - the Kinesis client providerpublic static com.amazonaws.services.kinesis.AmazonKinesis buildCredentials(String accessKey, String secretKey, com.amazonaws.regions.Regions region)
AmazonKinesis object with specified credentialsaccessKey - the access keysecretKey - the secret keyregion - the AWS regionpublic boolean write(T data)
IVolumeWriterwrite in interface IVolumeWriter<T>data - the object to writetrue if the write operation finished successfully. false in other caseprotected abstract byte[] toBytes(T data)
data - object to convertCopyright © 2020. All rights reserved.