AWSAbstractKinesisRecorder

Objective-C

@interface AWSAbstractKinesisRecorder

Swift

class AWSAbstractKinesisRecorder

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

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger diskBytesUsed;

    Swift

    var diskBytesUsed: UInt { get }
  • The threshold of disk bytes for notification. When exceeded, saveRecord:streamName: posts AWSKinesisRecorderByteThresholdReachedNotification. The default is 0 meaning it will not post the notification. @discussion The notificationByteThreshold should be smaller than diskByteLimit.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger notificationByteThreshold;

    Swift

    var notificationByteThreshold: UInt { get set }
  • 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.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger diskByteLimit;

    Swift

    var diskByteLimit: UInt { get set }
  • 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.

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval diskAgeLimit;

    Swift

    var diskAgeLimit: TimeInterval { get set }
  • The maxium batch data size in bytes. The default value is 512KB. The maximum is 4MB.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger batchRecordsByteLimit;

    Swift

    var batchRecordsByteLimit: UInt { get set }
  • 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.

    Declaration

    Objective-C

    - (id)saveRecord:(NSData *)data streamName:(NSString *)streamName;

    Swift

    func saveRecord(_ data: Data!, streamName: String!) -> Any!

    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.

  • 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.

    Declaration

    Objective-C

    - (id)saveRecord:(NSData *)data
          streamName:(NSString *)streamName
        partitionKey:(NSString *)partitionKey;

    Swift

    func saveRecord(_ data: Data!, streamName: String!, partitionKey: String!) -> Any!

    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.

  • 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.

    Declaration

    Objective-C

    - (id)submitAllRecords;

    Swift

    func submitAllRecords() -> Any!

    Return Value

    AWSTask - task.result is always nil.

  • Removes all requests saved to disk.

    Declaration

    Objective-C

    - (id)removeAllRecords;

    Swift

    func removeAllRecords() -> Any!

    Return Value

    AWSTask - task.result is always nil.