public void SetStock(AlbumId albumId, int count)Updates the cached stock level for albumId.
All Types / MusicStore.Api.Services
public sealed class InventoryCache
Data-owning inventory cache backed by Mutex<T>. Eliminates raw lock blocks — it is impossible to read or mutate the dictionary without holding the guard.
public void SetStock(AlbumId albumId, int count)Updates the cached stock level for albumId.
public Option<int> GetStock(AlbumId albumId)Reads the cached stock level for albumId as an Option<T>.
public bool TryReserve(AlbumId albumId, int quantity)Atomically reserves quantity units if sufficient stock is cached.