Generic multi-owner, multi-slot continuous-progress work queue. 更多...
#include <Production.h>
Public 成员函数 | |
| WorkQueue (const WorkQueue &)=delete | |
| WorkQueue & | operator= (const WorkQueue &)=delete |
| WorkQueue (WorkQueue &&)=default | |
| Work queue. | |
| WorkQueue & | operator= (WorkQueue &&)=default |
| Operator =. | |
| WorkQueue (eve::PersistentId instanceId={}) | |
| Creates an empty queue with an optional persistent identity. | |
| eve::Result< std::string > | enqueue (std::string_view owner, std::string_view kind, std::string_view product, eve::Value context, double duration, int priority=0) |
| Enqueues a task and returns its stable ID. | |
| eve::Result< std::string > | enqueue (ProductionRequest request) |
| Enqueues a validated request with optional pinned definition and reservation evidence. | |
| eve::Result< void > | pause (std::string_view taskId) |
| Pauses a queued or running task, or returns NotFound/Conflict. | |
| eve::Result< void > | resume (std::string_view taskId) |
| Returns a paused task to deterministic scheduling. | |
| eve::Result< void > | cancel (std::string_view taskId, std::string_view reason="cancelled") |
| Cancels a non-terminal task with a structured outcome. | |
| eve::Result< void > | fail (std::string_view taskId, std::string_view reason="failed") |
| Marks a non-terminal task failed with a structured outcome. | |
| eve::Result< void > | settle (std::string_view taskId, ProductionSettlementReceipt receipt) |
| Atomically marks a ready task settled and retains its idempotency receipt. | |
| eve::Result< void > | failSettlement (std::string_view taskId, std::string_view reason) |
| Records a retryable domain settlement failure without losing completed work. | |
| eve::Result< void > | retrySettlement (std::string_view taskId) |
| Returns a failed settlement to the ready state for an explicit retry. | |
| eve::Result< ProductionReservationRelease > | releaseReservation (std::string_view taskId, std::string_view releaseId) |
| Idempotently releases cancelled/failed reservation evidence for domain rollback. | |
| eve::Result< void > | contribute (std::string_view taskId, WorkContribution contribution) |
| Applies deterministic external work after efficiency scaling. | |
| eve::Result< void > | reportStock (std::string_view taskId, int observedStock) |
| Reports current domain stock for a maintain-stock task and reschedules deterministically. | |
| eve::Result< void > | advance (const eve::SimulationStep &step) |
| Applies one injected deterministic simulation step. | |
| eve::Result< std::uint32_t > | advanceTo (eve::SimulationTick target, eve::Duration fixedDelta, std::uint32_t maxSteps) |
| Advances through bounded fixed steps to a target tick. | |
| eve::SimulationTick | currentTick () const noexcept |
| Return the latest simulation tick applied to this queue. | |
| eve::Result< void > | setSlotCount (std::string_view owner, int slots) |
| Sets an owner's parallel slot count; zero prevents new tasks from running. | |
| int | slotCount (std::string_view owner) const |
| Returns an owner's slot count, defaulting to one. | |
| int | runningCount (std::string_view owner) const |
| Returns the number of currently running tasks for an owner. | |
| eve::Result< void > | setSchedulerStrategy (std::string_view owner, SchedulerStrategy strategy) |
| Selects an owner's deterministic queue ordering strategy. | |
| SchedulerStrategy | schedulerStrategy (std::string_view owner) const |
| Returns an owner's queue ordering strategy, defaulting to Priority. | |
| eve::Result< void > | setResourceCapacity (std::string_view owner, std::string_view resource, int capacity) |
| Sets named running capacity for an owner; zero disables that capability. | |
| int | resourceCapacity (std::string_view owner, std::string_view resource) const |
Returns named capacity, defaulting slot to slotCount and other resources to zero. | |
| eve::Result< std::string > | blockReason (std::string_view taskId) const |
| Returns the deterministic reason a task cannot start, or an empty string when runnable. | |
| eve::Result< void > | setDefinitionAvailable (std::string_view owner, const eve::definition::DefinitionHandle &definition, bool available) |
| Publishes or withdraws one generation-qualified definition fact for an owner. | |
| eve::Result< void > | setTagAvailable (std::string_view owner, std::string_view tag, bool available) |
| Publishes or withdraws one exact tag fact for an owner. | |
| bool | definitionAvailable (std::string_view owner, const eve::definition::DefinitionHandle &definition) const |
| Reports whether an exact definition incarnation is available to an owner. | |
| bool | tagAvailable (std::string_view owner, std::string_view tag) const |
| Reports whether an exact tag is available to an owner. | |
| eve::Result< ProductionPrediction > | predict (std::string_view taskId) const |
| Predicts task timing without mutating queue state. | |
| eve::Result< ProductionDiagnostic > | diagnose (std::string_view taskId) const |
| Returns structured diagnostic state for a task. | |
| eve::OptionalRef< const ProductionTask > | find (std::string_view taskId) |
| Finds a retained task by stable ID. | |
| eve::OptionalRef< const ProductionTask > | find (std::string_view taskId) const |
| Const overload of find with the same immediate-borrow lifetime. | |
| int | taskCount () const |
| Returns retained task count in enqueue order. | |
| eve::OptionalRef< const ProductionTask > | taskAt (int index) |
| Returns a retained task by enqueue index, or an empty borrowed reference. | |
| eve::OptionalRef< const ProductionTask > | taskAt (int index) const |
| Const overload of taskAt with the same immediate-borrow lifetime. | |
| int | ownerTaskCount (std::string_view owner) const |
| Returns retained task count for an owner. | |
| eve::OptionalRef< const ProductionTask > | ownerTaskAt (std::string_view owner, int index) |
| Returns an owner's retained task by enqueue index, or an empty borrowed reference. | |
| eve::OptionalRef< const ProductionTask > | ownerTaskAt (std::string_view owner, int index) const |
| Const overload of ownerTaskAt with the same immediate-borrow lifetime. | |
| int | eventCount () const |
| Returns retained event count. | |
| eve::OptionalRef< ProductionEvent > | eventAt (int index) |
| Returns an event by sequence index, or an empty borrowed reference. | |
| eve::OptionalRef< const ProductionEvent > | eventAt (int index) const |
| Const overload of eventAt with the same immediate-borrow lifetime. | |
| void | clearEvents () |
| Clears retained events without resetting sequence numbering. | |
| eve::Result< std::string > | snapshot () const |
| Serializes the complete queue as deterministic JSON. | |
| eve::Result< void > | restore (std::string_view json) |
| Transactionally restores a snapshot; failure preserves current state. | |
| void | clear () |
| Clears tasks, owner settings, events, and stable counters. | |
| eve::Result< eve::SnapshotEnvelope > | snapshot (const eve::SnapshotHashProvider &hashProvider) const |
| Captures the production payload in the common snapshot envelope. | |
| eve::Result< void > | restoreSnapshot (const eve::SnapshotEnvelope &snapshot, const eve::SnapshotHashProvider &hashProvider) |
| Restores a verified or migrated production envelope atomically. | |
| eve::Result< std::string > | snapshotEnvelopeJson (const eve::SnapshotHashProvider &hashProvider) const |
| Serializes the common production snapshot envelope. | |
| eve::Result< void > | restoreSnapshotJson (std::string_view json, const eve::SnapshotHashProvider &hashProvider) |
| Parses and transactionally restores a common production envelope. | |
详细描述
Generic multi-owner, multi-slot continuous-progress work queue.
在文件 Production.h 第 200 行定义.
构造及析构函数说明
◆ WorkQueue() [1/3]
|
delete |
◆ WorkQueue() [2/3]
|
default |
Work queue.
◆ WorkQueue() [3/3]
|
explicit |
Creates an empty queue with an optional persistent identity.
在文件 Production.cpp 第 54 行定义.
成员函数说明
◆ advance()
| eve::Result< void > eve::production::WorkQueue::advance | ( | const eve::SimulationStep & | step | ) |
Applies one injected deterministic simulation step.
- 参数
-
step Tick and fixed duration supplied by a SimulationClock.
- 返回
- Success, or a structured failure if the tick is not strictly newer or the step is invalid.
- 备注
- Owner-thread only. The queue never reads a wall clock.
在文件 Production.cpp 第 509 行定义.
引用了 appliedNanoseconds, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Duration::fromNanoseconds(), eve::InvalidArgument, pending, eve::PreconditionViolation, remainderPermille, eve::production::Running, step , 以及 eve::Result< T >::success().
被这些函数引用 advanceTo().
◆ advanceTo()
| eve::Result< std::uint32_t > eve::production::WorkQueue::advanceTo | ( | eve::SimulationTick | target, |
| eve::Duration | fixedDelta, | ||
| std::uint32_t | maxSteps | ||
| ) |
Advances through bounded fixed steps to a target tick.
在文件 ProductionAdvanced.cpp 第 149 行定义.
引用了 advance(), distance, eve::Result< T >::failure(), eve::InvalidArgument, eve::Duration::nanoseconds(), eve::PreconditionViolation, step, eve::Result< T >::success(), target , 以及 eve::detail::StrongUint64< Tag >::value().
◆ blockReason()
| eve::Result< std::string > eve::production::WorkQueue::blockReason | ( | std::string_view | taskId | ) | const |
Returns the deterministic reason a task cannot start, or an empty string when runnable.
在文件 Production.cpp 第 125 行定义.
引用了 eve::production::AllOf, eve::production::AnyOf, eve::production::ProductionDependencies::blocks, eve::production::Completed, definitionAvailable(), eve::production::ProductionTask::dependencies, find(), eve::production::ProductionRepeatPolicy::maintainStockTarget, eve::production::ProductionDependencies::mode, eve::NotFound, eve::production::ProductionRepeatPolicy::observedStock, eve::production::ProductionTask::owner, eve::production::ProductionDependencies::prerequisites, eve::production::ProductionTask::repeat, eve::production::ProductionDependencies::requiredDefinitions, eve::production::ProductionDependencies::requiredTags, eve::Result< T >::success(), tag, tagAvailable() , 以及 taskId.
被这些函数引用 diagnose() , 以及 predict().
◆ cancel()
| eve::Result< void > eve::production::WorkQueue::cancel | ( | std::string_view | taskId, |
| std::string_view | reason = "cancelled" |
||
| ) |
Cancels a non-terminal task with a structured outcome.
在文件 Production.cpp 第 371 行定义.
引用了 eve::Applied, eve::production::ProductionTerminationPolicy::cancellation, eve::production::Cancelled, eve::Conflict, eve::NotFound, eve::scheduling::ItemMetadata::reason, eve::production::ProductionTask::refundPermille, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success(), taskId , 以及 eve::production::ProductionTask::termination.
◆ clear()
| void eve::production::WorkQueue::clear | ( | ) |
Clears tasks, owner settings, events, and stable counters.
在文件 ProductionPersistence.cpp 第 699 行定义.
引用了 eve::detail::StrongUint64< detail::SimulationTickTag >::zero() , 以及 eve::detail::StrongUint64< detail::RevisionTag >::zero().
◆ clearEvents()
| void eve::production::WorkQueue::clearEvents | ( | ) |
Clears retained events without resetting sequence numbering.
在文件 Production.cpp 第 621 行定义.
◆ contribute()
| eve::Result< void > eve::production::WorkQueue::contribute | ( | std::string_view | taskId, |
| WorkContribution | contribution | ||
| ) |
Applies deterministic external work after efficiency scaling.
在文件 Production.cpp 第 486 行定义.
引用了 eve::Applied, eve::Conflict, eve::production::WorkContribution::contributor, eve::production::WorkContribution::efficiencyPermille, eve::production::WorkContribution::effort, eve::Result< T >::failure(), eve::Duration::fromNanoseconds(), eve::InvalidArgument, eve::Duration::nanoseconds(), eve::NotFound, eve::production::Running, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
◆ currentTick()
|
inlinenoexcept |
Return the latest simulation tick applied to this queue.
在文件 Production.h 第 265 行定义.
◆ definitionAvailable()
| bool eve::production::WorkQueue::definitionAvailable | ( | std::string_view | owner, |
| const eve::definition::DefinitionHandle & | definition | ||
| ) | const |
Reports whether an exact definition incarnation is available to an owner.
在文件 ProductionAdvanced.cpp 第 40 行定义.
引用了 key.
被这些函数引用 blockReason().
◆ diagnose()
| eve::Result< ProductionDiagnostic > eve::production::WorkQueue::diagnose | ( | std::string_view | taskId | ) | const |
Returns structured diagnostic state for a task.
在文件 ProductionAdvanced.cpp 第 207 行定义.
引用了 blockReason(), eve::production::ProductionDiagnostic::code, eve::production::ProductionDiagnostic::correlationId, eve::production::ProductionTask::correlationId, eve::Result< T >::failure(), find(), eve::scheduling::ItemMetadata::id, eve::production::ProductionDiagnostic::message, eve::NotFound, reference, eve::production::ProductionTask::state, eve::Result< T >::success(), eve::production::ProductionDiagnostic::taskId, taskId, eve::production::taskStateName() , 以及 eve::production::ProductionDiagnostic::tick.
◆ enqueue() [1/2]
| eve::Result< std::string > eve::production::WorkQueue::enqueue | ( | ProductionRequest | request | ) |
Enqueues a validated request with optional pinned definition and reservation evidence.
在文件 Production.cpp 第 231 行定义.
引用了 eve::production::ProductionTask::batchSize, eve::production::ProductionTask::context, eve::production::ProductionTask::correlationId, eve::production::ProductionTask::definition, eve::production::ProductionTask::dependencies, eve::production::ProductionTask::duration, eve::production::ProductionTask::efficiencyPermille, eve::production::Enqueued, eve::production::ProductionTask::enqueueSequence, eve::Result< T >::failure(), find(), eve::Value::getIf(), eve::scheduling::ItemMetadata::id, id, eve::InvalidArgument, key, kind, eve::production::ProductionTask::kind, eve::NotFound, eve::production::ProductionTask::owner, path, eve::scheduling::ItemMetadata::priority, eve::production::ProductionTask::product, eve::production::ProductionTask::random, eve::production::ProductionTask::repeat, request, eve::production::ProductionTask::reservation, eve::production::ProductionTask::reservationState, eve::production::Reserved, eve::production::ProductionTask::resources, schedule, eve::production::ProductionTask::settlementRequired, eve::Result< T >::success(), tag, eve::production::ProductionTask::termination , 以及 values.
◆ enqueue() [2/2]
| eve::Result< std::string > eve::production::WorkQueue::enqueue | ( | std::string_view | owner, |
| std::string_view | kind, | ||
| std::string_view | product, | ||
| eve::Value | context, | ||
| double | duration, | ||
| int | priority = 0 |
||
| ) |
Enqueues a task and returns its stable ID.
- 参数
-
owner Logical owner of the work slots. kind Domain task kind; the queue does not interpret it. product Domain product identifier; the queue does not interpret it. context Owning canonical payload for the task. duration Positive work duration in seconds. priority Higher priorities run first; enqueue order breaks ties.
- 返回
- A stable task ID, or a structured validation/allocation failure.
在文件 Production.cpp 第 216 行定义.
引用了 context, duration, enqueue(), eve::Result< T >::failure(), eve::Duration::fromSeconds(), kind, eve::production::ProductionRequest::owner, priority , 以及 request.
被这些函数引用 enqueue().
◆ eventAt() [1/2]
| eve::OptionalRef< ProductionEvent > eve::production::WorkQueue::eventAt | ( | int | index | ) |
Returns an event by sequence index, or an empty borrowed reference.
在文件 Production.cpp 第 611 行定义.
引用了 index.
被这些函数引用 eve::queue_editing::RuntimeQueueInspector::capture().
◆ eventAt() [2/2]
| eve::OptionalRef< const ProductionEvent > eve::production::WorkQueue::eventAt | ( | int | index | ) | const |
Const overload of eventAt with the same immediate-borrow lifetime.
在文件 Production.cpp 第 616 行定义.
引用了 index.
◆ eventCount()
| int eve::production::WorkQueue::eventCount | ( | ) | const |
Returns retained event count.
在文件 Production.cpp 第 609 行定义.
被这些函数引用 eve::queue_editing::RuntimeQueueInspector::capture().
◆ fail()
| eve::Result< void > eve::production::WorkQueue::fail | ( | std::string_view | taskId, |
| std::string_view | reason = "failed" |
||
| ) |
Marks a non-terminal task failed with a structured outcome.
在文件 Production.cpp 第 386 行定义.
引用了 eve::Applied, eve::Conflict, eve::production::Failed, eve::production::ProductionTerminationPolicy::failure, eve::NotFound, eve::scheduling::ItemMetadata::reason, eve::production::ProductionTask::refundPermille, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success(), taskId , 以及 eve::production::ProductionTask::termination.
◆ failSettlement()
| eve::Result< void > eve::production::WorkQueue::failSettlement | ( | std::string_view | taskId, |
| std::string_view | reason | ||
| ) |
Records a retryable domain settlement failure without losing completed work.
在文件 Production.cpp 第 424 行定义.
引用了 eve::Applied, eve::Conflict, eve::InvalidArgument, eve::NotFound, eve::production::ReadyToSettle, eve::scheduling::ItemMetadata::reason, eve::production::SettlementFailed, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
被这些函数引用 eve::rpg::Crafting::settle().
◆ find() [1/2]
| eve::OptionalRef< const ProductionTask > eve::production::WorkQueue::find | ( | std::string_view | taskId | ) |
Finds a retained task by stable ID.
- 返回
- An immediate borrowed reference, empty when the ID is absent. @ownership WorkQueue owns the task; the reference is not owning. @lifetime Valid until queue mutation, restore, clear, or destruction. @thread Owner-thread only; no synchronization is provided.
在文件 Production.cpp 第 332 行定义.
引用了 taskId.
被这些函数引用 blockReason(), diagnose(), enqueue(), predict(), restore() , 以及 eve::rpg::Crafting::settle().
◆ find() [2/2]
| eve::OptionalRef< const ProductionTask > eve::production::WorkQueue::find | ( | std::string_view | taskId | ) | const |
Const overload of find with the same immediate-borrow lifetime.
在文件 Production.cpp 第 338 行定义.
引用了 taskId.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ownerTaskAt() [1/2]
| eve::OptionalRef< const ProductionTask > eve::production::WorkQueue::ownerTaskAt | ( | std::string_view | owner, |
| int | index | ||
| ) |
Returns an owner's retained task by enqueue index, or an empty borrowed reference.
在文件 Production.cpp 第 595 行定义.
引用了 index.
◆ ownerTaskAt() [2/2]
| eve::OptionalRef< const ProductionTask > eve::production::WorkQueue::ownerTaskAt | ( | std::string_view | owner, |
| int | index | ||
| ) | const |
Const overload of ownerTaskAt with the same immediate-borrow lifetime.
在文件 Production.cpp 第 602 行定义.
引用了 index.
◆ ownerTaskCount()
| int eve::production::WorkQueue::ownerTaskCount | ( | std::string_view | owner | ) | const |
◆ pause()
| eve::Result< void > eve::production::WorkQueue::pause | ( | std::string_view | taskId | ) |
Pauses a queued or running task, or returns NotFound/Conflict.
在文件 Production.cpp 第 345 行定义.
引用了 eve::Applied, eve::Conflict, eve::NotFound, eve::production::ProductionTask::owner, eve::production::Paused, eve::production::Queued, eve::production::Running, schedule, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
◆ predict()
| eve::Result< ProductionPrediction > eve::production::WorkQueue::predict | ( | std::string_view | taskId | ) | const |
Predicts task timing without mutating queue state.
在文件 ProductionAdvanced.cpp 第 167 行定义.
引用了 eve::production::ProductionPrediction::blockReason, blockReason(), eve::production::ProductionPrediction::estimatedCompletionAfter, eve::production::ProductionPrediction::estimatedStartAfter, eve::production::ProductionPrediction::exact, eve::Result< T >::failure(), find(), eve::Duration::fromNanoseconds(), eve::InvalidArgument, eve::NotFound, eve::production::ProductionTask::owner, eve::production::ProductionPrediction::ownWorkRemaining, eve::production::Queued, reference, eve::production::Running, runningCount(), slotCount(), eve::production::ProductionTask::state, eve::Result< T >::success() , 以及 taskId.
◆ releaseReservation()
| eve::Result< ProductionReservationRelease > eve::production::WorkQueue::releaseReservation | ( | std::string_view | taskId, |
| std::string_view | releaseId | ||
| ) |
Idempotently releases cancelled/failed reservation evidence for domain rollback.
在文件 ProductionAdvanced.cpp 第 111 行定义.
引用了 eve::Applied, eve::production::Cancelled, eve::Conflict, eve::production::Failed, eve::InvalidArgument, eve::production::None, eve::NoOp, eve::NotFound, eve::production::ProductionTask::refundPermille, eve::production::Released, eve::production::ProductionReservationRelease::releaseId, eve::production::ProductionTask::reservation, eve::production::ProductionTask::reservationRelease, eve::production::ProductionTask::reservationState, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
◆ reportStock()
| eve::Result< void > eve::production::WorkQueue::reportStock | ( | std::string_view | taskId, |
| int | observedStock | ||
| ) |
Reports current domain stock for a maintain-stock task and reschedules deterministically.
在文件 ProductionAdvanced.cpp 第 137 行定义.
引用了 eve::Applied, eve::InvalidArgument, eve::production::ProductionRepeatPolicy::maintainStockTarget, eve::NotFound, eve::production::ProductionRepeatPolicy::observedStock, eve::production::ProductionTask::owner, eve::production::ProductionTask::repeat, schedule, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
◆ resourceCapacity()
| int eve::production::WorkQueue::resourceCapacity | ( | std::string_view | owner, |
| std::string_view | resource | ||
| ) | const |
Returns named capacity, defaulting slot to slotCount and other resources to zero.
在文件 Production.cpp 第 104 行定义.
引用了 key, resource , 以及 slotCount().
◆ restore()
| eve::Result< void > eve::production::WorkQueue::restore | ( | std::string_view | json | ) |
Transactionally restores a snapshot; failure preserves current state.
在文件 ProductionPersistence.cpp 第 287 行定义.
引用了 eve::production::AllOf, eve::production::AnyOf, eve::Applied, eve::production::Completed, eve::production::Consumed, context, definitions, error, eve::Result< T >::failure(), eve::production::Fifo, find(), eve::Value::fromJson(), eve::production::Full, generation, handle, ids, index, eve::production::ProductionEvent::kind, name, eve::production::None, output, eve::json::Document::parse(), eve::DefinitionRef::parse(), eve::ParseError, eve::production::Priority, eve::production::Proportional, eve::production::Queued, reference, eve::production::Released, eve::production::Reserved, revision, root, second, eve::scheduling::EventMetadata::sequence, sequence, setDefinitionAvailable(), setResourceCapacity(), setSchedulerStrategy(), setSlotCount(), setTagAvailable(), eve::production::ShortestRemaining, size, slots, source, eve::production::Started, state, eve::Status::success(), eve::Result< T >::success(), target, text, tick, value , 以及 visiting.
被这些函数引用 eve::rts::RTSProductionActionAdapter::cancel(), eve::rts::ProductionComponent::Impl::Impl(), eve::rts::ProductionComponent::Impl::operator=(), eve::rts::ProductionComponent::restore() , 以及 restoreSnapshot().
◆ restoreSnapshot()
| eve::Result< void > eve::production::WorkQueue::restoreSnapshot | ( | const eve::SnapshotEnvelope & | snapshot, |
| const eve::SnapshotHashProvider & | hashProvider | ||
| ) |
Restores a verified or migrated production envelope atomically.
- 参数
-
snapshot Source envelope with schema production:queue.hashProvider Explicit content-digest provider.
- 返回
- Success, or a failure leaving queue state unchanged.
在文件 ProductionSnapshot.cpp 第 245 行定义.
引用了 eve::Conflict, eve::Result< T >::failure(), eve::InvalidArgument, eve::detail::Id128< Tag >::isNil(), payload, restore(), source, eve::Result< T >::success() , 以及 eve::validateSnapshotPayloadMetadata().
被这些函数引用 restoreSnapshotJson().
◆ restoreSnapshotJson()
| eve::Result< void > eve::production::WorkQueue::restoreSnapshotJson | ( | std::string_view | json, |
| const eve::SnapshotHashProvider & | hashProvider | ||
| ) |
Parses and transactionally restores a common production envelope.
在文件 ProductionSnapshot.cpp 第 279 行定义.
引用了 eve::Result< T >::failure(), eve::parseSnapshotEnvelope(), restoreSnapshot() , 以及 source.
◆ resume()
| eve::Result< void > eve::production::WorkQueue::resume | ( | std::string_view | taskId | ) |
Returns a paused task to deterministic scheduling.
在文件 Production.cpp 第 358 行定义.
引用了 eve::Applied, eve::Conflict, eve::NotFound, eve::production::ProductionTask::owner, eve::production::Paused, eve::production::Queued, eve::production::Resumed, schedule, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
◆ retrySettlement()
| eve::Result< void > eve::production::WorkQueue::retrySettlement | ( | std::string_view | taskId | ) |
Returns a failed settlement to the ready state for an explicit retry.
在文件 Production.cpp 第 438 行定义.
引用了 eve::Applied, eve::Conflict, eve::NotFound, eve::production::ReadyToSettle, eve::scheduling::ItemMetadata::reason, eve::production::SettlementFailed, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
◆ runningCount()
| int eve::production::WorkQueue::runningCount | ( | std::string_view | owner | ) | const |
Returns the number of currently running tasks for an owner.
在文件 Production.cpp 第 98 行定义.
被这些函数引用 predict().
◆ schedulerStrategy()
| SchedulerStrategy eve::production::WorkQueue::schedulerStrategy | ( | std::string_view | owner | ) | const |
Returns an owner's queue ordering strategy, defaulting to Priority.
在文件 ProductionAdvanced.cpp 第 34 行定义.
引用了 key , 以及 eve::production::Priority.
◆ setDefinitionAvailable()
| eve::Result< void > eve::production::WorkQueue::setDefinitionAvailable | ( | std::string_view | owner, |
| const eve::definition::DefinitionHandle & | definition, | ||
| bool | available | ||
| ) |
Publishes or withdraws one generation-qualified definition fact for an owner.
在文件 ProductionAdvanced.cpp 第 51 行定义.
引用了 eve::Applied, exists, eve::InvalidArgument, key, eve::NoOp, schedule, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 restore().
◆ setResourceCapacity()
| eve::Result< void > eve::production::WorkQueue::setResourceCapacity | ( | std::string_view | owner, |
| std::string_view | resource, | ||
| int | capacity | ||
| ) |
Sets named running capacity for an owner; zero disables that capability.
在文件 Production.cpp 第 563 行定义.
引用了 eve::Applied, capacity, eve::InvalidArgument, key, resource, schedule, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 restore().
◆ setSchedulerStrategy()
| eve::Result< void > eve::production::WorkQueue::setSchedulerStrategy | ( | std::string_view | owner, |
| SchedulerStrategy | strategy | ||
| ) |
Selects an owner's deterministic queue ordering strategy.
在文件 ProductionAdvanced.cpp 第 80 行定义.
引用了 eve::Applied, eve::InvalidArgument, key, schedule, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 restore().
◆ setSlotCount()
| eve::Result< void > eve::production::WorkQueue::setSlotCount | ( | std::string_view | owner, |
| int | slots | ||
| ) |
Sets an owner's parallel slot count; zero prevents new tasks from running.
在文件 Production.cpp 第 549 行定义.
引用了 eve::Applied, eve::InvalidArgument, key, schedule, slots, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 restore().
◆ setTagAvailable()
| eve::Result< void > eve::production::WorkQueue::setTagAvailable | ( | std::string_view | owner, |
| std::string_view | tag, | ||
| bool | available | ||
| ) |
Publishes or withdraws one exact tag fact for an owner.
在文件 ProductionAdvanced.cpp 第 66 行定义.
引用了 eve::Applied, exists, eve::InvalidArgument, key, eve::NoOp, schedule, eve::Status::success(), eve::Result< T >::success() , 以及 tag.
被这些函数引用 restore().
◆ settle()
| eve::Result< void > eve::production::WorkQueue::settle | ( | std::string_view | taskId, |
| ProductionSettlementReceipt | receipt | ||
| ) |
Atomically marks a ready task settled and retains its idempotency receipt.
在文件 Production.cpp 第 401 行定义.
引用了 eve::Applied, eve::production::Completed, eve::Conflict, eve::production::Consumed, eve::InvalidArgument, eve::Value::isObject(), eve::production::ProductionTask::lastSettlementId, eve::NoOp, eve::NotFound, eve::production::ProductionSettlementReceipt::payload, eve::production::ReadyToSettle, eve::scheduling::ItemMetadata::reason, eve::production::ProductionTask::reservationState, eve::production::ProductionTask::settlement, eve::production::SettlementFailed, eve::production::ProductionSettlementReceipt::settlementId, eve::production::Started, eve::production::ProductionTask::state, eve::Status::success(), eve::Result< T >::success() , 以及 taskId.
◆ slotCount()
| int eve::production::WorkQueue::slotCount | ( | std::string_view | owner | ) | const |
Returns an owner's slot count, defaulting to one.
在文件 Production.cpp 第 92 行定义.
引用了 key.
被这些函数引用 predict() , 以及 resourceCapacity().
◆ snapshot() [1/2]
| eve::Result< std::string > eve::production::WorkQueue::snapshot | ( | ) | const |
Serializes the complete queue as deterministic JSON.
在文件 ProductionPersistence.cpp 第 148 行定义.
引用了 eve::production::AllOf, eve::production::Consumed, context, eve::production::eventKindName(), eve::Result< T >::failure(), eve::production::Fifo, first, ids, index, name, eve::production::None, eve::production::Proportional, quote, eve::production::Released, eve::production::Reserved, second, eve::production::ShortestRemaining, eve::production::Started, eve::Result< T >::success(), t, eve::production::taskStateName() , 以及 eve::detail::StrongUint64< Tag >::value().
被这些函数引用 eve::rts::RTSProductionActionAdapter::cancel(), eve::rts::ProductionComponent::Impl::Impl(), eve::rts::ProductionComponent::Impl::operator=(), snapshot() , 以及 snapshotEnvelopeJson().
◆ snapshot() [2/2]
| eve::Result< eve::SnapshotEnvelope > eve::production::WorkQueue::snapshot | ( | const eve::SnapshotHashProvider & | hashProvider | ) | const |
Captures the production payload in the common snapshot envelope.
在文件 ProductionSnapshot.cpp 第 236 行定义.
引用了 eve::Result< T >::failure(), eve::Value::fromJson(), eve::makeSnapshotEnvelope(), payload , 以及 snapshot().
◆ snapshotEnvelopeJson()
| eve::Result< std::string > eve::production::WorkQueue::snapshotEnvelopeJson | ( | const eve::SnapshotHashProvider & | hashProvider | ) | const |
Serializes the common production snapshot envelope.
在文件 ProductionSnapshot.cpp 第 272 行定义.
引用了 eve::Result< T >::failure(), eve::serializeSnapshotEnvelope(), snapshot() , 以及 value.
◆ tagAvailable()
| bool eve::production::WorkQueue::tagAvailable | ( | std::string_view | owner, |
| std::string_view | tag | ||
| ) | const |
Reports whether an exact tag is available to an owner.
在文件 ProductionAdvanced.cpp 第 46 行定义.
引用了 tag.
被这些函数引用 blockReason().
◆ taskAt() [1/2]
| eve::OptionalRef< const ProductionTask > eve::production::WorkQueue::taskAt | ( | int | index | ) |
Returns a retained task by enqueue index, or an empty borrowed reference.
在文件 Production.cpp 第 580 行定义.
引用了 index.
被这些函数引用 eve::queue_editing::RuntimeQueueInspector::capture().
◆ taskAt() [2/2]
| eve::OptionalRef< const ProductionTask > eve::production::WorkQueue::taskAt | ( | int | index | ) | const |
Const overload of taskAt with the same immediate-borrow lifetime.
在文件 Production.cpp 第 585 行定义.
引用了 index.
◆ taskCount()
| int eve::production::WorkQueue::taskCount | ( | ) | const |
Returns retained task count in enqueue order.
在文件 Production.cpp 第 578 行定义.
被这些函数引用 eve::queue_editing::RuntimeQueueInspector::capture().
该类的文档由以下文件生成:
- src/modules/production/Production.h
- src/modules/production/Production.cpp
- src/modules/production/ProductionAdvanced.cpp
- src/modules/production/ProductionPersistence.cpp
- src/modules/production/ProductionSnapshot.cpp