~/bend-docscommunity

src/scan/BlockRoutePolicy.bend checks

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

4 imports
import Base
import ../Keys.bend as Keys
import ../coordinator/QueuePolicy.bend as QueuePolicy
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

Types

type Move source · line 11 · raw

Data

Selects the lower or upper half of the separator search interval.

Definitions

def midpoint.copies source · line 15 · raw

@lows:Pair(Nat, Nat) -> @high:Nat -> Nat

def midpoint source · line 21 · raw

@low:Nat -> @high:Nat -> Nat

Chooses the midpoint of a half-open block-index interval.

def move.order source · line 24 · raw

@is_less:Bool -> Move

def move source · line 30 · raw

@target:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @separator:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> Move

Compares the target key with one block's first-key separator.

def advance.lower source · line 33 · raw

@state:Search -> @mid:Nat -> Search

def advance.upper.copies source · line 37 · raw

@state:Search -> @mids:Pair(Nat, Nat) -> Search

def advance.upper source · line 44 · raw

@state:Search -> @mid:Nat -> Search

def advance source · line 48 · raw

@state:Search -> @direction:Move -> @mid:Nat -> Search

Advances the interval and candidate after one separator comparison.

def active source · line 54 · raw

@state:Search -> Bool

Reports whether the half-open search interval remains nonempty.

def selected_block source · line 59 · raw

@state:Search -> Nat

Returns the latest separator not greater than the target key.