~/bend-docscommunity

src/coordinator/OwnerGeneration.bend checks

raw source on the hub · import mylsm-lsm-store@0.6.0.0/src/coordinator/OwnerGeneration.bend as OwnerGeneration

2 imports
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

Types

type Decision source · line 5 · raw

Data

Determines the next owner generation without allowing identifier wraparound.

Definitions

def next.result source · line 10 · raw

@generation:U32 -> @wraps:Bool -> Decision

Separates the increment result from the wrap test.

def u32.bytes source · line 16 · raw

@value:U32 -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes

Encodes an unsigned field in big-endian byte order.

def u32.read.value source · line 20 · raw

@pair:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Maybe<&2, U32>) -> U32

Extracts a decoded word while consuming the buffer returned by the reader.

def u32.read source · line 25 · raw

@input:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> U32

def u32.clone.pair.copies source · line 28 · raw

@copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> Pair(U32, U32)

def u32.clone.pair.buffers source · line 32 · raw

@+len:U32 -> @copies:Pair(Array<U32>, Array<U32>) -> Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes)

def u32.clone.pair.input source · line 39 · raw

@input:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> Pair(U32, U32)

def u32.clone.pair source · line 46 · raw

@value:U32 -> Pair(U32, U32)

Duplicates one fixed-width owner identifier without natural-number recursion.

def next.copies source · line 50 · raw

@copies:Pair(U32, U32) -> Decision

Advances a stored generation or reports terminal exhaustion.

def next source · line 56 · raw

@current:Maybe<&2, U32> -> Decision

Chooses generation one for a new owner state and advances a persisted value.

def response.generation source · line 62 · raw

@active:U32 -> U32