PreEmptive Analytics iOS API  2.0
The official iOS API for sending PreEmptive Analytics data.
PADefaultFlowController.h
1 //
2 // PADefaultFlowController.h
3 // PreEmptiveAnalyticsClient
4 //
5 // Copyright (c) 2013 PreEmptive Solutions. All rights reserved.
6 //
7 
8 #import <Foundation/Foundation.h>
9 #import "PAClient.h"
10 
29 
33 @property (nonatomic) NSUInteger gain;
34 
38 @property (nonatomic) NSUInteger quietGain;
39 
43 @property NSUInteger maximumSequentialFailureCount;
44 
48 @property NSUInteger retryTimeout;
49 
54 -(id) init;
55 
62 -(id) initWithConfiguration:(PAConfiguration*)config;
63 
64 
70 -(NSUInteger) getInterval:(NSUInteger)numberOfMessages;
71 
77 -(NSUInteger) messagesToDrop:(NSUInteger)currentMessageCount;
78 
83 -(BOOL) okToTransmit;
84 
89 -(void) onSend:(BOOL)sendSucceeded;
90 
91 
98 -(BOOL) hasBatchExpired:(NSDate*)date attempts:(NSUInteger) attempts;
99 @end
NSUInteger gain
The rate at which the interval should be changed in relation to the number of messages queued...
NSUInteger maximumSequentialFailureCount
The maximum number of sequential transmission failures before waiting the duration of the retryTimeou...
BOOL okToTransmit()
Determines if message sending is currently permitted.
id init()
Initializes the flow controller with default values.
NSUInteger retryTimeout
The number of milliseconds to wait before allowing transmissions after a series of sequential failure...
The default flow controller.
NSUInteger quietGain
The rate at which the interval should be changed when the queue is empty.
Protocol for defining a flow controller.
The configuration for the client.