LootLocker Unreal SDK 10.4.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
FLootLockerHTTPExecutionQueue Class Reference

Manages the LootLocker HTTP request queue as a per-frame singleton. More...

#include <LootLockerHTTPExecutionQueue.h>

Public Member Functions

void ScheduleRequest (const FLootLockerHTTPRequestData &Request)
 Enqueues a request for dispatch on the next available tick.
 
void OverrideConfiguration (const FLootLockerHTTPClientConfiguration &NewConfig)
 Replaces the active configuration.
 
 FLootLockerHTTPExecutionQueue ()=default
 Do not construct directly — use Get() or Initialize() instead.
 

Static Public Member Functions

static FLootLockerHTTPExecutionQueueGet ()
 Returns the singleton instance.
 
static void Initialize ()
 Creates and starts ticking the singleton.
 
static bool IsInitialized ()
 Returns true if Initialize() has been called and Shutdown() has not yet been called.
 
static void Shutdown ()
 Aborts all in-flight requests, drains the queue with error callbacks, and destroys the singleton.
 

Detailed Description

Manages the LootLocker HTTP request queue as a per-frame singleton.

Maintains a two-phase per-frame loop that:

  1. Promotes pending requests to in-flight status (respecting MaxOngoingRequests and Retry-After delays).
  2. Polls in-flight requests for completion, handles retries, session refresh, and rate limiting.
  3. Cleans up completed items and invokes response listeners.

Ticks via FTSTicker::GetCoreTicker() — exactly once per frame, always on the game thread, regardless of how many worlds are active (no PIE multi-tick race).

Access the singleton via Get(). Call Initialize() once on startup (done automatically by FLootLockerSDKModule::StartupModule()) and Shutdown() on teardown.

Constructor & Destructor Documentation

◆ FLootLockerHTTPExecutionQueue()

FLootLockerHTTPExecutionQueue::FLootLockerHTTPExecutionQueue ( )
default

Do not construct directly — use Get() or Initialize() instead.

Member Function Documentation

◆ Get()

static FLootLockerHTTPExecutionQueue & FLootLockerHTTPExecutionQueue::Get ( )
static

Returns the singleton instance.

Lazy-initializes if not already initialized.

◆ Initialize()

static void FLootLockerHTTPExecutionQueue::Initialize ( )
static

Creates and starts ticking the singleton.

Safe to call multiple times.

◆ IsInitialized()

static bool FLootLockerHTTPExecutionQueue::IsInitialized ( )
static

Returns true if Initialize() has been called and Shutdown() has not yet been called.

◆ OverrideConfiguration()

void FLootLockerHTTPExecutionQueue::OverrideConfiguration ( const FLootLockerHTTPClientConfiguration NewConfig)

Replaces the active configuration.

Takes effect from the next Tick().

◆ ScheduleRequest()

void FLootLockerHTTPExecutionQueue::ScheduleRequest ( const FLootLockerHTTPRequestData Request)

Enqueues a request for dispatch on the next available tick.

If the queue is full and DenyIncomingRequestsWhenBackedUp is true the request is immediately failed via its listeners. If a request with the same RequestId is already queued the new listeners are merged into the existing entry.

◆ Shutdown()

static void FLootLockerHTTPExecutionQueue::Shutdown ( )
static

Aborts all in-flight requests, drains the queue with error callbacks, and destroys the singleton.