载入中...
搜索中...
未找到
StatePatch.h
浏览该文件的文档.
112 bool setExpected(const std::string& subject, const std::string& key, const std::string& jsonValue,
152 [[nodiscard]] eve::script::Borrowed<PatchBatch> resolveBatch(PatchBatchHandleRef reference) noexcept;
206 [[nodiscard]] eve::Result<eve::SnapshotEnvelope> snapshot(const eve::SnapshotHashProvider& hashProvider) const;
216 [[nodiscard]] eve::Result<std::string> snapshotEnvelopeJson(const eve::SnapshotHashProvider& hashProvider) const;
259class EVENGINE_API_FOUNDATION StoreTransactionParticipant final : public transaction::ITransactionParticipant {
274 [[nodiscard]] eve::Result<void> prepare(const transaction::TransactionContext& context) override;
276 [[nodiscard]] eve::Result<void> commit(const transaction::TransactionContext& context) override;
278 [[nodiscard]] eve::Result<void> rollback(const transaction::TransactionContext& context) override;
280 [[nodiscard]] eve::Result<void> compensate(const transaction::TransactionContext& context) override;
286 [[nodiscard]] eve::Result<void> contextFailure(const transaction::TransactionContext& context) const;
318 [[nodiscard]] static eve::script::Borrowed<Store> resolve(StateStoreHandleRef reference) noexcept;
325 [[nodiscard]] static eve::script::Borrowed<PatchBatch> resolveBatch(StateBatchHandleRef reference) noexcept;
Move-only, checked operation results for the common layer.
Versioned, integrity-checked persistence envelopes.
Explicit Value/Owned/Borrowed semantics at the Squirrel boundary.
Non-owning observation of a registry-owned object.
Definition RuntimeBorrow.h:27
Slot/generation registry whose objects are exclusively unique-owned.
Definition RuntimeRegistry.h:292
Ordered collection of set and remove operations committed atomically.
Definition StatePatch.h:107
Script module factory for generic state patch stores.
Definition StatePatch.h:301
static bool isStale(StateStoreHandleRef reference) noexcept
Reports whether a store reference is stale for the current module.
Definition StatePatch.cpp:713
static eve::Result< void > releaseBatch(StateBatchHandleRef reference)
Releases a store-qualified patch batch.
Definition StatePatch.cpp:675
Module_REG(StatePatch)
static eve::script::Borrowed< PatchBatch > resolveBatch(StateBatchHandleRef reference) noexcept
Resolves a store-qualified batch as a non-owning observation.
Definition StatePatch.cpp:667
static eve::script::Borrowed< Store > resolve(StateStoreHandleRef reference) noexcept
Resolves a live store as a non-owning observation.
Definition StatePatch.cpp:696
static bool isBatchStale(StateBatchHandleRef reference) noexcept
Reports whether a store-qualified batch reference is stale.
Definition StatePatch.cpp:688
~StatePatch() override
Withdraw world-state capability listeners before owned stores are destroyed.
Definition StatePatch.cpp:631
static eve::Result< void > release(StateStoreHandleRef reference)
Releases a module-owned state store.
Definition StatePatch.cpp:702
static eve::Result< StateStoreHandleRef > newStore()
Allocates a state store and returns its ownership reference.
Definition StatePatch.cpp:657
Transaction participant that atomically applies one StatePatch batch.
Definition StatePatch.h:259
std::string_view name() const noexcept override
Stable participant name used in transaction diagnostics.
Definition StatePatch.h:271
StoreTransactionParticipant(Store &store, PatchBatch &batch)
Bind one patch batch to a Store transaction.
Definition StatePatch.h:266
~StoreTransactionParticipant() override=default
Store transaction participant.
Deterministic subject-and-key JSON value store with atomic patching.
Definition StatePatch.h:140
Synchronous participant contract for one coordinator transaction.
Definition Transaction.h:129
Immutable context shared by every participant of one transaction.
Definition Transaction.h:31
Definition StateAccessAdapter.cpp:14
std::function< Result< ContentId >(std::string_view canonicalInput)> SnapshotHashProvider
Injected content-digest implementation used by snapshots.
Definition Snapshot.h:36
Stable outer format shared by persistence and cross-process snapshots.
Definition Snapshot.h:46
constexpr bool isValid() const noexcept
Returns whether both the handle and its registry epoch are set.
Definition RuntimeBorrow.h:77
constexpr std::uint64_t packed() const noexcept
Returns the packed slot/generation projection.
Definition RuntimeBorrow.h:79
Immutable description of one committed value change.
Definition StatePatch.h:96
Handle domain for store-owned patch batches.
Definition StatePatch.h:30
One validation error produced while applying a patch batch.
Definition StatePatch.h:57
Compatibility summary of the most recent batch commit attempt. @compatibility Prefer Store::commit → ...
Definition StatePatch.h:87
A patch batch reference qualified by both its owning Store and batch slot.
Definition StatePatch.h:41
constexpr bool isValid() const noexcept
Returns whether both nested references are syntactically valid.
Definition StatePatch.h:49
constexpr std::uint64_t packed() const noexcept
Returns the batch slot/generation projection.
Definition StatePatch.h:47
Handle domain for module-owned state-patch stores.
Definition StatePatch.h:26