载入中...
搜索中...
未找到
StatePatch.h
浏览该文件的文档.
91 bool setExpected(const std::string& subject, const std::string& key, const std::string& jsonValue,
131 [[nodiscard]] eve::script::Borrowed<PatchBatch> resolveBatch(PatchBatchHandleRef reference) noexcept;
177 [[nodiscard]] eve::Result<eve::SnapshotEnvelope> snapshot(const eve::SnapshotHashProvider& hashProvider) const;
187 [[nodiscard]] eve::Result<std::string> snapshotEnvelopeJson(const eve::SnapshotHashProvider& hashProvider) const;
230class EVENGINE_API_FOUNDATION StoreTransactionParticipant final : public transaction::ITransactionParticipant {
245 [[nodiscard]] eve::Result<void> prepare(const transaction::TransactionContext& context) override;
247 [[nodiscard]] eve::Result<void> commit(const transaction::TransactionContext& context) override;
249 [[nodiscard]] eve::Result<void> rollback(const transaction::TransactionContext& context) override;
251 [[nodiscard]] eve::Result<void> compensate(const transaction::TransactionContext& context) override;
257 [[nodiscard]] eve::Result<void> contextFailure(const transaction::TransactionContext& context) const;
289 [[nodiscard]] static eve::script::Borrowed<Store> resolve(StateStoreHandleRef reference) noexcept;
296 [[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 C++ observation with no implicit lifetime extension.
Definition RuntimeRegistry.h:42
Slot/generation registry whose objects are exclusively unique-owned.
Definition RuntimeRegistry.h:359
Ordered collection of set and remove operations committed atomically.
Definition StatePatch.h:86
Script module factory for generic state patch stores.
Definition StatePatch.h:272
static bool isStale(StateStoreHandleRef reference) noexcept
Reports whether a store reference is stale for the current module.
Definition StatePatch.cpp:723
static eve::Result< void > releaseBatch(StateBatchHandleRef reference)
Releases a store-qualified patch batch.
Definition StatePatch.cpp:685
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:677
static eve::script::Borrowed< Store > resolve(StateStoreHandleRef reference) noexcept
Resolves a live store as a non-owning observation.
Definition StatePatch.cpp:706
static bool isBatchStale(StateBatchHandleRef reference) noexcept
Reports whether a store-qualified batch reference is stale.
Definition StatePatch.cpp:698
~StatePatch() override
Withdraw world-state capability listeners before owned stores are destroyed.
Definition StatePatch.cpp:641
static eve::Result< StateStoreHandleRef > newStore()
Allocates a state store and returns its ownership reference.
Definition StatePatch.cpp:667
Transaction participant that atomically applies one StatePatch batch.
Definition StatePatch.h:230
std::string_view name() const noexcept override
Stable participant name used in transaction diagnostics.
Definition StatePatch.h:242
StoreTransactionParticipant(Store &store, PatchBatch &batch)
Bind one patch batch to a Store transaction.
Definition StatePatch.h:237
~StoreTransactionParticipant() override=default
Store transaction participant.
Deterministic subject-and-key JSON value store with atomic patching.
Definition StatePatch.h:119
Synchronous participant contract for one coordinator transaction.
Definition Transaction.h:128
Immutable context shared by every participant of one transaction.
Definition Transaction.h:30
Definition StateAccessAdapter.cpp:13
@ Failed
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 RuntimeRegistry.h:96
constexpr std::uint64_t packed() const noexcept
Returns the packed slot/generation projection.
Definition RuntimeRegistry.h:98
Immutable description of one committed value change.
Definition StatePatch.h:75
Handle domain for store-owned patch batches.
Definition StatePatch.h:30
One validation error produced while applying a patch batch.
Definition StatePatch.h:57
Summary of the most recent batch commit attempt.
Definition StatePatch.h:66
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