Anoma.Node.Transaction.Shard.Cell (Anoma v0.35.0)

Summary

Types

The height associated with an operation.

t()

I represent a cell within a shard

The watermark type

Types

height()

@type height() :: non_neg_integer()

The height associated with an operation.

t()

@type t() :: %Anoma.Node.Transaction.Shard.Cell{
  details: %{required(height()) => Anoma.Node.Transaction.Shard.Detail.t()},
  watermarks: watermarks()
}

I represent a cell within a shard

watermarks()

@type watermarks() :: %{write: height()}

The watermark type

Functions

add_pending(c, height, from)

@spec add_pending(t(), height(), GenServer.from()) :: t()

advance_watermark(w, height)

@spec advance_watermark(watermarks(), height()) :: watermarks()

can_reserve(arg1, ht)

@spec can_reserve(t(), height()) :: :ok | {:error, atom()}

Checks if a reservation request conflicts with existing watermarks.

detail_at(cell, height)

@spec detail_at(t(), height()) :: Anoma.Node.Transaction.Shard.Detail.t()

read(cell, h)

@spec read(t(), height()) :: {:ok, any()} | :absent | :blocked

replace_detail(c, height, f)

@spec replace_detail(t(), height(), (Anoma.Node.Transaction.Shard.Detail.t() ->
                                 {:error, atom()}
                                 | {:ok,
                                    Anoma.Node.Transaction.Shard.Detail.t()})) ::
  {:ok, t()} | {:error, atom()}

reserve(c, height)

@spec reserve(t(), height()) :: {:ok, t()} | {:error, atom()}

resolve_pending(c)

@spec resolve_pending(t()) :: t()

retract(c, height, pid)

@spec retract(t(), height(), pid()) :: t()

run_advance_watermark(c, height)

@spec run_advance_watermark(t(), height()) :: t()

unreserve(c, height)

@spec unreserve(t(), height()) :: t()

update_detail(c, height, f)

write(c, height, value)

@spec write(t(), height(), any()) :: t()