#import <MQTTPersistence.h>
The MQTTPersistence protocol is an abstraction of persistence classes for MQTTSession
§ allFlowsforClientId:incomingFlag:()
- (NSArray *) allFlowsforClientId: |
|
(NSString *) |
clientId |
incomingFlag: |
|
(BOOL) |
incomingFlag |
|
|
| |
Retrieves all MQTTFlow elements of a clientId and direction
- Parameters
-
- Returns
- an NSArray of the retrieved MQTTFlow elements
§ deleteAllFlowsForClientId:()
- (void) deleteAllFlowsForClientId: |
|
(NSString *) |
clientId |
|
Deletes all MQTTFlow elements of a clientId
- Parameters
-
§ deleteFlow:()
- (void) deleteFlow: |
|
(id< MQTTFlow >) |
flow |
|
§ flowforClientId:incomingFlag:messageId:()
- (id<MQTTFlow>) flowforClientId: |
|
(NSString *) |
clientId |
incomingFlag: |
|
(BOOL) |
incomingFlag |
messageId: |
|
(UInt16) |
messageId |
|
|
| |
Retrieves an MQTTFlow element
- Parameters
-
clientId | |
incomingFlag | |
messageId | |
- Returns
- the retrieved MQTTFlow element or nil if the elememt was not found
§ storeMessageForClientId:topic:data:retainFlag:qos:msgId:incomingFlag:commandType:deadline:()
- (id<MQTTFlow>) storeMessageForClientId: |
|
(NSString *) |
clientId |
topic: |
|
(NSString *) |
topic |
data: |
|
(NSData *) |
data |
retainFlag: |
|
(BOOL) |
retainFlag |
qos: |
|
(MQTTQosLevel) |
qos |
msgId: |
|
(UInt16) |
msgId |
incomingFlag: |
|
(BOOL) |
incomingFlag |
commandType: |
|
(UInt8) |
commandType |
deadline: |
|
(NSDate *) |
deadline |
|
|
| |
Stores one new message
- Parameters
-
clientId | |
topic | |
data | |
retainFlag | |
qos | |
msgId | |
incomingFlag | |
commandType | |
deadline | |
- Returns
- the created MQTTFlow element or nil if the maxWindowSize has been exceeded
§ sync()
sync is called to allow the MQTTPersistence implemetation to save data permanently
§ windowSize:()
- (NSUInteger) windowSize: |
|
(NSString *) |
clientId |
|
The current Window Size for outgoing inflight messages per clientID.
- Parameters
-
- Returns
- the current size of the outgoing inflight window
§ maxMessages
- (NSUInteger) maxMessages |
|
readwritenonatomicassign |
The maximum number of messages kept per clientID and direction. Defaults to 1024
§ maxSize
The maximum size of the storage used for persistence in total in bytes. Defaults to 1024*1024 bytes
§ maxWindowSize
- (NSUInteger) maxWindowSize |
|
readwritenonatomicassign |
The maximum Window Size for outgoing inflight messages per clientID. Defaults to 16
§ persistent
Indicates if the persistence implementation should make the information permannent. Defaults to NO
The documentation for this protocol was generated from the following file: