AWSAbstractKinesisRecorder Class Reference

Inherits from AWSService : NSObject
Declared in AWSAbstractKinesisRecorder.h
AWSAbstractKinesisRecorder.m

Overview

AWSAbstractKinesisRecorder is an abstract class. You should not instantiate this class directly. Instead use its concrete subclasses AWSKinesisRecorder and AWSFirehoseRecorder.

  diskBytesUsed

The number of bytes currently used to store AWSKinesisPutRecordInput objects on disk.

@property (nonatomic, assign, readonly) NSUInteger diskBytesUsed

Declared In

AWSAbstractKinesisRecorder.h

  notificationByteThreshold

The threshold of disk bytes for notification. When exceeded, saveRecord:streamName: posts AWSKinesisRecorderByteThresholdReachedNotification. The default is 0 meaning it will not post the notification.

@property (nonatomic, assign) NSUInteger notificationByteThreshold

Discussion

The notificationByteThreshold should be smaller than diskByteLimit.

Declared In

AWSAbstractKinesisRecorder.h

  diskByteLimit

The limit of the disk cache size in bytes. When exceeded, older requests will be discarded. Setting this value to 0.0 meaning no practical limit. The default value is 5MB.

@property (nonatomic, assign) NSUInteger diskByteLimit

Declared In

AWSAbstractKinesisRecorder.h

  diskAgeLimit

The age limit of the cached requests. When exceeded, requests older than the specified age will be discarded. Setting this value to 0 meaning no practical limit. The default is no age limit.

@property (nonatomic, assign) NSTimeInterval diskAgeLimit

Declared In

AWSAbstractKinesisRecorder.h

  batchRecordsByteLimit

The maxium batch data size in bytes. The default value is 512KB. The maximum is 4MB.

@property (nonatomic, assign) NSUInteger batchRecordsByteLimit

Declared In

AWSAbstractKinesisRecorder.h

– saveRecord:streamName:

Saves a record to local storage to be sent later. The record will be submitted to the streamName provided with a randomly generated partition key to ensure equal distribution across shards.

- (AWSTask *)saveRecord:(NSData *)data streamName:(NSString *)streamName

Parameters

data

The data to send to Amazon Kinesis. It needs to be smaller than 256KB.

streamName

The stream name for Amazon Kinesis.

Return Value

AWSTask - task.result is always nil.

Declared In

AWSAbstractKinesisRecorder.h

– saveRecord:streamName:partitionKey:

Note: The partitionKey is used to distribute records between shards, therefore using the same partitionKey across multiple calls could cause provisioned throughput to be exceeded on one shard. Saves a record to local storage to be sent later. The record will be submitted to the streamName provided with a specified partition key to ensure equal distribution across shards.

- (AWSTask *)saveRecord:(NSData *)data streamName:(NSString *)streamName partitionKey:(NSString *)partitionKey

Parameters

data

The data to send to Amazon Kinesis. It needs to be smaller than 256KB.

streamName

The stream name for Amazon Kinesis.

partitionKey

The partition key for Amazon Kinesis.

Return Value

AWSTask - task.result is always nil.

Declared In

AWSAbstractKinesisRecorder.h

– submitAllRecords

Submits all locally saved requests to Amazon Kinesis. Requests that are successfully sent will be deleted from the device. Requests that fail due to the device being offline will stop the submission process and be kept. Requests that fail due to other reasons (such as the request being invalid) will be deleted.

- (AWSTask *)submitAllRecords

Return Value

AWSTask - task.result is always nil.

Declared In

AWSAbstractKinesisRecorder.h

– removeAllRecords

Removes all requests saved to disk.

- (AWSTask *)removeAllRecords

Return Value

AWSTask - task.result is always nil.

Declared In

AWSAbstractKinesisRecorder.h