Interface OperationReservation

One operation reservation as a store reads it.

interface OperationReservation {
    id: string;
    operation: string;
    micro: number;
    recordedMicro: number;
    runs: number;
    leaseUntil: null | Date;
    leaseRun: null | number;
    expires: Date;
    settledAt: null | Date;
}

Properties

id: string

The id the store gave it.

operation: string

The caller's operation, unique among the store's reservations.

micro: number

The amount reserved for every run the operation may have, in micro-dollars.

recordedMicro: number

What the row settles at: each ended run's settled figure and each other run's whole bound.

runs: number

The runs begun.

leaseUntil: null | Date

When the lease of the run holding it ends, or null when no run holds it.

leaseRun: null | number

The number of the run holding the lease, or null. Run numbers only grow, so it is a fencing token.

expires: Date

When the row's window closes.

settledAt: null | Date

When it settled, or null while open.