Adapts one persistent Store to state queries and transactional writes. 更多...
#include <StateAccessAdapter.h>
Public 成员函数 | |
| StatePatchStateAdapter (Store &store) noexcept | |
| Bind a borrowed authoritative persistent store. | |
| std::optional< eve::Value > | value (std::string_view subject, std::string_view key) const override |
| Query a generic world value. | |
| std::optional< bool > | hasTag (std::string_view subject, std::string_view tag) const override |
| Query exact tag membership. | |
| std::optional< eve::Value > | attribute (std::string_view, std::string_view) const override |
| Query a numeric or structured attribute. | |
| std::optional< eve::Value > | resource (std::string_view, std::string_view) const override |
| Query a resource value or marker. | |
| std::optional< eve::Value > | state (std::string_view subject, std::string_view key) const override |
| Query a persistent/world state value. | |
| std::optional< bool > | authority (std::string_view, std::string_view) const override |
| Query read-only authority for a scope. | |
| eve::Result< eve::MutationReceipt > | apply (std::span< const eve::StateMutation > mutations, const eve::MutationContext &context) override |
| Apply a complete mutation set atomically. | |
Public 成员函数 继承自 eve::state::IStateQuery | |
| virtual | ~IStateQuery ()=default |
| I state query. | |
Public 成员函数 继承自 eve::state::IStateMutation | |
| virtual | ~IStateMutation ()=default |
| I state mutation. | |
| virtual eve::Result< MutationReceipt > | apply (std::span< const StateMutation > mutations, const MutationContext &context)=0 |
| Apply a complete mutation set atomically. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::state::IStateQuery | |
| static constexpr const char * | capabilityName = "eve.state.IStateQuery" |
静态 Public 属性 继承自 eve::state::IStateMutation | |
| static constexpr const char * | capabilityName = "eve.state.IStateMutation" |
详细描述
Adapts one persistent Store to state queries and transactional writes.
Every mutation is staged into a StoreTransactionParticipant and committed by the transaction Coordinator. A failed request therefore leaves the Store, revision, dirty set, and change events unchanged.
在文件 StateAccessAdapter.h 第 22 行定义.
构造及析构函数说明
◆ StatePatchStateAdapter()
|
inlineexplicitnoexcept |
Bind a borrowed authoritative persistent store.
在文件 StateAccessAdapter.h 第 25 行定义.
成员函数说明
◆ apply()
|
override |
Apply a complete mutation set atomically.
Applies .
在文件 StateAccessAdapter.cpp 第 67 行定义.
引用了 eve::Applied, eve::statepatch::PatchResult::changedCount, context, current, eve::transaction::Coordinator::execute(), eve::Failed, eve::Result< T >::failure(), found, handle, eve::statepatch::Store::has(), eve::Result< void >::ignore(), index, eve::InvalidArgument, key, eve::statepatch::Store::newBatch(), eve::NoOp, path, pending, eve::statepatch::Store::releaseBatch(), eve::statepatch::Store::resolveBatch(), eve::SerializationError, eve::StaleHandle, eve::Status::success(), eve::Result< T >::success(), eve::Value::toJson(), eve::state::MutationReceipt::transactionId , 以及 eve::Unsupported.
◆ attribute()
|
inlineoverridevirtual |
◆ authority()
|
inlineoverridevirtual |
◆ hasTag()
|
overridevirtual |
Query exact tag membership.
True when tag.
在文件 StateAccessAdapter.cpp 第 52 行定义.
引用了 eve::Value::asBool(), eve::statepatch::Store::has(), eve::Value::isBool(), key, subject, tag , 以及 value.
◆ resource()
|
inlineoverridevirtual |
Query a resource value or marker.
在文件 StateAccessAdapter.h 第 40 行定义.
◆ state()
|
overridevirtual |
◆ value()
|
overridevirtual |
Query a generic world value.
在文件 StateAccessAdapter.cpp 第 46 行定义.
该类的文档由以下文件生成:
- src/modules/statepatch/StateAccessAdapter.h
- src/modules/statepatch/StateAccessAdapter.cpp
Public 成员函数 继承自