def owner.snapshot.open.reserved
mylsm-lsm-store@0.6.0.1 · src/scan/Snapshot.bend:470
import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshot
import Base
470def owner.snapshot.open.reserved(
471 allocator: ResourceIdAllocator,
472 snapshots: List<&2, SnapshotResource>,
473 cursors: List<&2, CursorResource>,
474 generation: Nat,
475 requests: Nat & Nat,
476 decision: RegistryDecision
477) -> OwnerOpenDecision:
478 match requests:
479 case (retained_bytes, release_bytes):
480 match decision:
481 case Admitted{reservations}:
482 owner.snapshot.open.id(allocate_resource_id(allocator), reservations,
483 snapshots, cursors, generation, release_bytes)
484 case Rejected{reservations}:
485 OwnerSnapshotRejected{OwnerRegistry{allocator, reservations,
486 snapshots, cursors}}