InMemoryNetworkTransactionStore

class InMemoryNetworkTransactionStore(cursorCodec: NetworkCursorCodec, maxTransactions: Int = DEFAULT_MAX_TRANSACTIONS) : NetworkTransactionStore

Bounded, thread-safe transaction store for the live network inspector.

Constructors

Link copied to clipboard
constructor(cursorCodec: NetworkCursorCodec, maxTransactions: Int = DEFAULT_MAX_TRANSACTIONS)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
open override fun find(id: String): NetworkTransaction?
Link copied to clipboard
Link copied to clipboard
open override fun record(transaction: NetworkTransaction)

Stores transaction. Recording an id that is already stored replaces the earlier transaction rather than adding a duplicate -- adapters rely on this to upgrade a provisional (still-streaming, metadata-only) record in place once the body completes.

Link copied to clipboard
fun NetworkTransactionStore.resolveExportSelection(selection: ExportSelection, baseQuery: NetworkTransactionQuery = NetworkTransactionQuery(limit = NetworkTransactionQuery.MAX_PAGE_LIMIT)): List<NetworkTransaction>?

Resolves selection against this store, bounded to NetworkTransactionQuery.MAX_PAGE_LIMIT rows. baseQuery supplies any additional filters (method, host, status, free-text search, ...) layered on top of ExportSelection.All or ExportSelection.TimeRange; it is ignored for ExportSelection.Ids, which is always an exact match regardless of filters -- a caller who picked specific rows expects exactly those rows back, not a filtered subset of them.

Link copied to clipboard
open override fun statusDistribution(): Map<String, Int>
Link copied to clipboard
Link copied to clipboard