Maintains a ledger of client state transitions with timestamps. More...
Instance Methods | |
(NSString *) | - description |
Provides a JSON string representation of all recorded state transitions. More... | |
(instancetype) | - initWithClientId:externalId: |
Initializes a new instance of the ClientStateLedger class. More... | |
(void) | - recordClientState: |
Records a new client state transition with the current timestamp. More... | |
Class Methods | |
(FMLiveSwitchClientStateLedger *) | + clientStateLedgerWithClientId:externalId: |
Initializes a new instance of the ClientStateLedger class. More... | |
Maintains a ledger of client state transitions with timestamps.
Tracks and records the history of state changes for a specific client over time.
+ (FMLiveSwitchClientStateLedger*) clientStateLedgerWithClientId: | (NSString *) | clientId | |
externalId: | (NSString *) | externalId | |
Initializes a new instance of the ClientStateLedger class.
Automatically records an initial "New" state.
clientId | The unique identifier for the client to track. |
externalId | The external identifier for the client. Can be null. |
- (NSString*) description |
Provides a JSON string representation of all recorded state transitions.
Includes client identification, state transition history with timestamps and elapsed times, and diagnostic information if the client never reached the registered state.
Initializes a new instance of the ClientStateLedger class.
Automatically records an initial "New" state.
clientId | The unique identifier for the client to track. |
externalId | The external identifier for the client. Can be null. |
- (void) recordClientState: | (FMLiveSwitchClientState) | state |
Records a new client state transition with the current timestamp.
Adds a new record to the state history with both UTC time and millisecond precision timestamp.
state | The new client state to record. |