载入中...
搜索中...
未找到
eve::pixelworld_replay::PixelReplayLog类 参考

Owning command log and periodic checkpoint projection for PixelWorld. 更多...

#include <PixelWorldReplay.h>

Public 成员函数

eve::Result< void > append (PixelReplayEntry entry)
 Append the next sequenced command; Tick order must be nondecreasing.
 
eve::Result< void > captureCheckpoint (const eve::pixelworld::PixelWorld &world)
 Capture a checkpoint from the synchronously borrowed world.
 
eve::Result< PixelReplayReceipt > replay (eve::pixelworld::PixelWorld &target, eve::SimulationTick throughTick) const
 Replay into an empty target through throughTick and verify checkpoints.
 
eve::Result< eve::SnapshotEnvelope > snapshot (eve::PersistentId instanceId, const eve::SnapshotHashProvider &hashProvider) const
 Seal this log in the shared versioned SnapshotEnvelope.
 
eve::Result< void > restoreSnapshot (const eve::SnapshotEnvelope &snapshot, const eve::SnapshotHashProvider &hashProvider)
 Verify, migrate and transactionally replace this log from an envelope.
 
std::span< const PixelReplayEntry > entries () const noexcept
 Immutable owning-log views, valid until this log is mutated or destroyed.
 
std::span< const PixelReplayCheckpoint > checkpoints () const noexcept
 

详细描述

Owning command log and periodic checkpoint projection for PixelWorld.

The log is not another mutable world authority. It owns immutable replay inputs and digests only. APIs are simulation-thread affine, invoke no callbacks, and use bit-exact integer hashes over canonical PixelWorld bytes.

在文件 PixelWorldReplay.h 第 67 行定义.

成员函数说明

◆ append()

◆ captureCheckpoint()

eve::Result< void > eve::pixelworld_replay::PixelReplayLog::captureCheckpoint ( const eve::pixelworld::PixelWorld &  world)

Capture a checkpoint from the synchronously borrowed world.

备注
The world is not retained or mutated. Checkpoint Tick must increase.

在文件 PixelWorldReplay.cpp 第 228 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::PreconditionViolation, eve::Result< T >::success(), value , 以及 world.

◆ checkpoints()

std::span< const PixelReplayCheckpoint > eve::pixelworld_replay::PixelReplayLog::checkpoints ( ) const
inlinenoexcept

在文件 PixelWorldReplay.h 第 109 行定义.

◆ entries()

std::span< const PixelReplayEntry > eve::pixelworld_replay::PixelReplayLog::entries ( ) const
inlinenoexcept

Immutable owning-log views, valid until this log is mutated or destroyed.

在文件 PixelWorldReplay.h 第 108 行定义.

◆ replay()

eve::Result< PixelReplayReceipt > eve::pixelworld_replay::PixelReplayLog::replay ( eve::pixelworld::PixelWorld &  target,
eve::SimulationTick  throughTick 
) const

Replay into an empty target through throughTick and verify checkpoints.

返回
A matched receipt or the first Tick/Chunk divergence. Malformed log or non-empty target is a structured failure and leaves admission state unchanged.
备注
The target is mutated after validation succeeds; operational failure during replay may leave it at the last fully committed Tick.

在文件 PixelWorldReplay.cpp 第 239 行定义.

引用了 eve::pixelworld_replay::PixelReplayReceipt::commandsApplied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::pixelworld_replay::PixelReplayReceipt::firstDivergence, eve::InvalidArgument, eve::pixelworld_replay::PixelReplayReceipt::match, eve::PreconditionViolation, eve::pixelworld_replay::PixelReplayReceipt::reachedTick, eve::Result< T >::success(), target, tick , 以及 eve::detail::StrongUint64< Tag >::value().

◆ restoreSnapshot()

eve::Result< void > eve::pixelworld_replay::PixelReplayLog::restoreSnapshot ( const eve::SnapshotEnvelope &  snapshot,
const eve::SnapshotHashProvider &  hashProvider 
)

Verify, migrate and transactionally replace this log from an envelope.

参数
snapshotExternally owned envelope borrowed only for this call.
hashProviderDigest provider used to verify the envelope before parsing.
备注
Versions 1 and 2 are accepted. Version 1 checkpoints migrate without per-Chunk diagnostics. Any failure leaves entries and checkpoints unchanged.

在文件 PixelWorldReplay.cpp 第 292 行定义.

引用了 append(), eve::pixelworld_replay::PixelReplayCheckpoint::chunks, eve::Conflict, digest, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, object, eve::ParseError, path, eve::SnapshotEnvelope::payload, eve::SnapshotEnvelope::revision, revision, eve::pixelworld_replay::PixelReplayCheckpoint::revision, root, eve::SnapshotEnvelope::schema, eve::SnapshotEnvelope::schemaVersion, eve::Result< T >::success(), eve::SnapshotEnvelope::tick, eve::pixelworld_replay::PixelReplayCheckpoint::tick, tick, eve::SnapshotEnvelope::type, eve::UnknownVersion, eve::detail::StrongUint64< Tag >::value(), eve::verifySnapshotEnvelope(), eve::pixelworld_replay::PixelReplayCheckpoint::worldDigest, x , 以及 y.

◆ snapshot()

eve::Result< eve::SnapshotEnvelope > eve::pixelworld_replay::PixelReplayLog::snapshot ( eve::PersistentId  instanceId,
const eve::SnapshotHashProvider &  hashProvider 
) const

Seal this log in the shared versioned SnapshotEnvelope.

参数
instanceIdStable identity of the owning replay/session.
hashProviderInjected content digest provider; no weak default is selected.
返回
Schema pixelworld:replay-log version 2 with canonical owning payload.

在文件 PixelWorldReplay.cpp 第 281 行定义.

引用了 eve::makeSnapshotEnvelope().


该类的文档由以下文件生成: