ExStorageService. Metadata. Models. OperationIntent
(ex_storage_service v0.6.2)
Copy Markdown
View Source
Durable protection for bytes that may be referenced by an unresolved write.
Intents are created after a content hash is known and before replica publication. A final metadata transaction marks the matching intent committed. Pending and unknown intents remain garbage-collection roots until their safety deadline.
Summary
Types
@type state() :: :pending | :unknown | :committed | :aborted
@type t() :: %ExStorageService.Metadata.Models.OperationIntent{ created_at_ms: non_neg_integer(), hash: binary(), node_generation: pos_integer(), node_id: binary(), operation_id: binary(), protected_until_ms: non_neg_integer(), schema: 2, size: non_neg_integer(), state: state(), updated_at_ms: non_neg_integer() }
Functions
@spec new( binary(), binary(), non_neg_integer(), binary(), pos_integer(), non_neg_integer(), non_neg_integer() ) :: {:ok, t()} | {:error, :invalid_operation_intent}
@spec protected?(t(), non_neg_integer()) :: boolean()