Pure checks shared by store adapters. These functions provide no atomicity; adapters must hold the relevant record and worker transaction locks throughout.
Summary
Functions
@spec cancel(SmolBox.Execution.t(), non_neg_integer()) :: {:ok, SmolBox.Execution.t()} | {:error, SmolBox.Error.t()}
@spec claim( SmolBox.Execution.t(), SmolBox.Store.lease() | nil, String.t(), non_neg_integer(), pos_integer() ) :: {:ok, SmolBox.Execution.t()} | {:error, SmolBox.Error.t()}
@spec cursor(SmolBox.Execution.t()) :: SmolBox.Store.cursor()
@spec due?(SmolBox.Execution.t(), non_neg_integer()) :: boolean()
@spec empty_usage() :: SmolBox.Store.resources()
@spec guard( SmolBox.Execution.t(), SmolBox.Store.guard(), SmolBox.Store.lease() | nil, non_neg_integer() ) :: :ok | {:error, SmolBox.Error.t()}
@spec initial(SmolBox.Execution.t()) :: :ok | {:error, SmolBox.Error.t()}
@spec lease(SmolBox.Store.lease() | nil, String.t(), non_neg_integer(), pos_integer()) :: {:ok, SmolBox.Store.lease()} | {:error, SmolBox.Error.t()}
@spec needs_work?(SmolBox.Execution.t()) :: boolean()
@spec release(SmolBox.Execution.t(), non_neg_integer()) :: {:ok, SmolBox.Execution.t()} | {:error, SmolBox.Error.t()}
@spec reservation( SmolBox.Execution.t(), String.t(), String.t(), SmolBox.Store.lease(), SmolBox.Store.capacity(), SmolBox.Store.resources(), non_neg_integer() ) :: {:ok, SmolBox.Execution.t()} | {:error, SmolBox.Error.t()}
@spec resources(SmolBox.Execution.t()) :: SmolBox.Store.resources()