Private constructor to enforce the Singleton pattern.
Timer used to periodically clean expired request tracker entries.
Dictionary tracking active requests.
Key format: ${requestId}:${executorContext}.
Cleanup interval
Default Delay time if request is delay only or default type request(both delay and abort)
Request tracker lifetime (30 minutes)
Aborts all active requests.
Abort all requests belonging to a specific identifier.
Helper function for creating a delayed execution for a request
The expected response type of the request.
The tracker entry associated with the request, used to manage delay state and timer.
The managed request instance containing abort state.
Function responsible for executing the request.
Unique identifier for logging and debugging.
Optional delay duration in milliseconds before executing the request.
Executes a managed request and tracks its lifecycle.
Forcefully removes all tracker entries for a given requestId and clears delay timers.
The request identifier to remove from dictionary.
Starts periodic cleanup of expired request trackers.
Returns the singleton instance of RequestManager.
Generated using TypeDoc
Coordinates execution, tracking, and cancellation of API requests. Multiple API calls can run for the same identifier.
const manager = RequestManager.getInstance(); manager.register('123::GetData', request);