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"
]
}]
}
| Constructor and Description |
|---|
KinesisRecorder(java.io.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(java.io.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 |
|---|---|
void |
saveRecord(byte[] data,
java.lang.String streamName)
Saves a record to local storage to be sent later.
|
deleteAllRecords, getDiskByteLimit, getDiskBytesUsed, getKinesisRecorderConfig, saveRecord, submitAllRecordspublic KinesisRecorder(java.io.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(java.io.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 recorderpublic void saveRecord(byte[] data,
java.lang.String streamName)
AbstractKinesisRecordersaveRecord in class AbstractKinesisRecorderdata - The data to submit to the streamstreamName - The stream to submit the data to.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.