src/ui/common/services/server-side-event-handler-queue.service.ts
A service that manages the queue of all SSEH events, ensuring they are processed in order.
Methods |
|
constructor(logger: SmartLoggerService)
|
||||||
|
Creates an instance of SmartServerSideEventHandlerQueueService.
Parameters :
|
| Public cancelSession | ||||||||
cancelSession(sessionId: string)
|
||||||||
|
Cancels pending events for a closed SSEH session.
Parameters :
Returns :
void
|
| Public getNextEventId | ||||||
getNextEventId(sessionId?: string)
|
||||||
|
Gets the next available event ID from the queue and adds it to the queue.
Parameters :
Returns :
number
The next event ID. |
| Public processingComplete | ||||||||
processingComplete(eventId: number)
|
||||||||
|
Signals that the event with the given ID has been processed.
Parameters :
Returns :
void
|
| Public waitForMyTurn | ||||||||
waitForMyTurn(eventId: number)
|
||||||||
|
Returns an observable that emits when it's the given event's turn to be processed.
Parameters :
Returns :
any
An observable that emits when it's the event's turn. |
| Public waitForMyTurnResult | ||||||||
waitForMyTurnResult(eventId: number)
|
||||||||
|
Returns an observable that emits a queue turn for the given event.
Parameters :
Returns :
any
The queue turn. |