Ple Cache#

class PleCache#

CPU metadata for one immutable PLE table. The owner must outlive every reservation and request lease. Only one batch may be active. Slot zero is permanently reserved for padding; it is not a table row.

Public Types

using RowId = int64_t#
using SlotId = int32_t#

Public Functions

PleCache(RowId rowCount, SlotId slotCount)#
PleCache(PleCache const&) = delete#
PleCache &operator=(PleCache const&) = delete#
PleCache(PleCache&&) = delete#
PleCache &operator=(PleCache&&) = delete#
BatchReservation reserveBatch(
std::vector<std::vector<RowId>> const &requests
)#

Validate all rows and union capacity before mutation. -1 maps to padding slot zero. Throws out_of_range for invalid rows, length_error for capacity, logic_error for an active batch.

class BatchReservation#

Owns admission pins until commit or rollback. Destruction rolls back an uncommitted fill.

Public Functions

BatchReservation(BatchReservation const&) = delete#
BatchReservation &operator=(BatchReservation const&) = delete#
BatchReservation(BatchReservation &&other) noexcept#
BatchReservation &operator=(BatchReservation &&other) noexcept#
~BatchReservation()#
std::vector<Miss> const &misses() const noexcept#
inline size_t uniqueRows() const noexcept#

Number of distinct non-padding rows protected by this reservation.

void markReady(SlotId slot)#

Publish a newly reserved row only after its bytes are available to the consumer stream.

std::vector<RequestLease> commit()#

Requires every miss ready; transfers the independent request pins to the caller.

void rollback() noexcept#

Removes new rows, including partially completed fills. Old protected hits survive; unprotected rows evicted during reservation are not restored.

struct Miss#

Public Members

RowId row#
SlotId slot#
class RequestLease#

Pins one request’s distinct rows. Release only after its engine work has completed.

Public Functions

RequestLease(RequestLease const&) = delete#
RequestLease &operator=(RequestLease const&) = delete#
RequestLease(RequestLease &&other) noexcept#
RequestLease &operator=(RequestLease &&other) noexcept#
~RequestLease()#
std::vector<SlotId> const &mapping() const#

Ordered slot map, including duplicates and padding; valid only while this lease is held.

void release() noexcept#
class RequestLease

Pins one request’s distinct rows. Release only after its engine work has completed.

Public Functions

RequestLease(RequestLease const&) = delete
RequestLease &operator=(RequestLease const&) = delete
RequestLease(RequestLease &&other) noexcept
RequestLease &operator=(RequestLease &&other) noexcept
~RequestLease()
std::vector<SlotId> const &mapping() const

Ordered slot map, including duplicates and padding; valid only while this lease is held.

void release() noexcept
class BatchReservation

Owns admission pins until commit or rollback. Destruction rolls back an uncommitted fill.

Public Functions

BatchReservation(BatchReservation const&) = delete
BatchReservation &operator=(BatchReservation const&) = delete
BatchReservation(BatchReservation &&other) noexcept
BatchReservation &operator=(BatchReservation &&other) noexcept
~BatchReservation()
std::vector<Miss> const &misses() const noexcept
inline size_t uniqueRows() const noexcept

Number of distinct non-padding rows protected by this reservation.

void markReady(SlotId slot)

Publish a newly reserved row only after its bytes are available to the consumer stream.

std::vector<RequestLease> commit()

Requires every miss ready; transfers the independent request pins to the caller.

void rollback() noexcept

Removes new rows, including partially completed fills. Old protected hits survive; unprotected rows evicted during reservation are not restored.

struct Miss

Public Members

RowId row
SlotId slot