public class KinesisRecorder extends AbstractKinesisRecorder
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [ "kinesis:PutRecords" ],
"Resource": [
"arn:aws:kinesis:us-east-1:123456789012:stream/my_stream"
]
}]
}
config, recordStore| Constructor and Description |
|---|
KinesisRecorder(File directory,
Regions region,
AWSCredentialsProvider credentialsProvider)
Constructs a new Kinesis Recorder specifying a directory that Kinesis
Recorder has exclusive access to for storing requests.
|
KinesisRecorder(File directory,
Regions region,
AWSCredentialsProvider credentialsProvider,
KinesisRecorderConfig config)
Constructs a new Kinesis Recorder specifying a directory that Kinesis
Recorder has exclusive access to for storing requests.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.amazonaws.mobileconnectors.kinesis.kinesisrecorder.RecordSender |
getRecordSender()
Gets the sender to send saved records.
|
void |
saveRecord(byte[] data,
String streamName)
Saves a record to local storage to be sent later.
|
deleteAllRecords, getDiskByteLimit, getDiskBytesUsed, getKinesisRecorderConfig, nextBatch, saveRecord, submitAllRecordspublic KinesisRecorder(File directory, Regions region, AWSCredentialsProvider credentialsProvider)
Note: Kinesis Recorder is synchronous, and it's methods should not be called on the main thread.
Note: Kinesis Recorder stores requests in plain-text, we recommend using a directory that is only readable by your application and not storing highly sensitive information in requests stored by Kinesis Recorder.
credentialsProvider - The credentials provider to use when making
requests to AWSregion - The region of Amazon Kinesis this Recorder should save and
send requests to.directory - An empty directory KinesisRecorder can use for storing
requests.public KinesisRecorder(File directory, Regions region, AWSCredentialsProvider credentialsProvider, KinesisRecorderConfig config)
credentialsProvider - The credentials provider to use when making
requests to AWSregion - The region of Amazon Kinesis this Recorder should save and
send requests to.directory - An empty directory KinesisRecorder can use for storing
requests.config - Allows configuring various parameters of the recorderprotected com.amazonaws.mobileconnectors.kinesis.kinesisrecorder.RecordSender getRecordSender()
AbstractKinesisRecordergetRecordSender in class AbstractKinesisRecorderRecordSenderpublic void saveRecord(byte[] data,
String streamName)
AbstractKinesisRecordersaveRecord in class AbstractKinesisRecorderdata - The data to submit to the streamstreamName - The stream to submit the data to.Copyright © 2019. All rights reserved.