pub struct FlowJob { /* private fields */ }Expand description
An executable binding for one compiled format-2 or bounded split flow.
Implementations§
Source§impl FlowJob
impl FlowJob
Sourcepub fn with_chunk_step<I, O, R, P, W>(
self,
node_id: NodeId,
step: ChunkStep<I, O, R, P, W>,
revisions: &ChunkComponentRevisions,
) -> Result<Self, FlowJobError>where
I: Send + Sync + 'static,
O: Send + Sync + 'static,
R: ItemReader<I> + Send + 'static,
P: ItemProcessor<I, O> + Send + 'static,
W: ItemWriter<O> + Send + 'static,
pub fn with_chunk_step<I, O, R, P, W>(
self,
node_id: NodeId,
step: ChunkStep<I, O, R, P, W>,
revisions: &ChunkComponentRevisions,
) -> Result<Self, FlowJobError>where
I: Send + Sync + 'static,
O: Send + Sync + 'static,
R: ItemReader<I> + Send + 'static,
P: ItemProcessor<I, O> + Send + 'static,
W: ItemWriter<O> + Send + 'static,
Binds a stateful chunk step to one compiled flow node.
The chunk’s size, component revisions, delivery mode, and fault policy
must exactly match the immutable plan. The component is erased only at
the existing tasklet composition boundary; the reader, processor, and
writer keep their concrete types (ADR-0008) all the way through, with
BoxedReader, BoxedProcessor,
and BoxedWriter available if a caller wants
item-level erasure too.
If step installs a CompletionPolicy, revisions must already
declare the matching completion-policy revision – computed via
completion_policy_revision and folded in with
ChunkComponentRevisions::with_completion_policy_revision before
the enclosing crate::FlowGraph was compiled, the same way a
stream revision is declared up front rather than derived here.
Unlike ChunkJob::new, this method cannot compute it for you: the
plan was already compiled from bare ChunkComponentRevisions before
this step (or the policy it installs) existed.
§Errors
Returns crate::FlowJobError::ComponentMismatch when executable and
manifest declarations differ (including a missing or stale declared
completion-policy revision), or the ordinary binding errors for an
unknown, wrong-kind, duplicate, or differently named node.
Source§impl FlowJob
impl FlowJob
Sourcepub fn new(
name: JobName,
plan: CompiledExecutionPlan,
) -> Result<Self, FlowJobError>
pub fn new( name: JobName, plan: CompiledExecutionPlan, ) -> Result<Self, FlowJobError>
Starts binding executable components to a compiled format-2 or format-3 plan.
§Errors
Rejects a compatibility plan or a plan identified under another job.
Sourcepub fn with_tasklet_step(
self,
node_id: NodeId,
step: TaskletStep,
) -> Result<Self, FlowJobError>
pub fn with_tasklet_step( self, node_id: NodeId, step: TaskletStep, ) -> Result<Self, FlowJobError>
Binds one tasklet step to a compiled step node.
§Errors
Rejects an unknown node, a decision node, a name mismatch, or a second binding for the same logical ID.
Sourcepub fn with_decider(
self,
node_id: NodeId,
decider: Arc<dyn JobExecutionDecider>,
) -> Result<Self, FlowJobError>
pub fn with_decider( self, node_id: NodeId, decider: Arc<dyn JobExecutionDecider>, ) -> Result<Self, FlowJobError>
Binds one deterministic decider to a compiled decision node.
§Errors
Rejects an unknown/step node or a duplicate binding.
Sourcepub fn with_split_tasklet_factory(
self,
node_id: NodeId,
factory: TaskletStepFactory,
) -> Result<Self, FlowJobError>
pub fn with_split_tasklet_factory( self, node_id: NodeId, factory: TaskletStepFactory, ) -> Result<Self, FlowJobError>
Binds a launch-scoped tasklet factory to one embedded split step.
§Errors
Rejects an unknown/non-tasklet branch step, a declared-name mismatch, or a second binding for the same logical ID.
Sourcepub fn with_partitioned_tasklet(
self,
node_id: NodeId,
partitioner: PartitionPlanFactory,
worker: PartitionTaskletFactory,
) -> Result<Self, FlowJobError>
pub fn with_partitioned_tasklet( self, node_id: NodeId, partitioner: PartitionPlanFactory, worker: PartitionTaskletFactory, ) -> Result<Self, FlowJobError>
Binds a deterministic plan factory and independent tasklet factory to one compiled local partition manager.
§Errors
Rejects an unknown/non-tasklet partition node, worker-name mismatch, or duplicate binding.
Sourcepub fn validate(&self) -> Result<(), FlowJobError>
pub fn validate(&self) -> Result<(), FlowJobError>
Validates that every compiled node has exactly one executable binding.
§Errors
Returns the first missing node in canonical identifier order.
Sourcepub const fn compiled_plan(&self) -> &CompiledExecutionPlan
pub const fn compiled_plan(&self) -> &CompiledExecutionPlan
Borrows the compiled plan.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FlowJob
impl !UnwindSafe for FlowJob
impl Freeze for FlowJob
impl Send for FlowJob
impl Sync for FlowJob
impl Unpin for FlowJob
impl UnsafeUnpin for FlowJob
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more