Class MockWorkCorpus
java.lang.Object
ai.pipestream.module.pipelineprobe.mockengine.MockWorkCorpus
The bounded supply of work the
MockWorkEngineService hands out. Each
call to next() yields one PipeStream until the configured count
is exhausted, then empties (the loop then sees NoWorkAvailable and idles).
MVP corpus is synthetic — a minimal PipeStream per unit, enough to
exercise any module's work-pull loop (echo round-trips it; richer stages just see
an empty doc). The court-1000 fixtures (an existing CourtFixtureSource /
embedder-pipedocs-court-1000) are the obvious next corpus to plug in here.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<ai.pipestream.data.v1.PipeStream> next()The next work unit, or empty once the count is exhausted.voidreset(int count) Reset the corpus to servecountfresh units (or the configured default whencount < 0).intReturns the number of work units handed out so far, capped at the effective limit.intReturns the effective unit budget this corpus will serve before draining.
-
Constructor Details
-
MockWorkCorpus
public MockWorkCorpus()CDI.
-
-
Method Details
-
next
The next work unit, or empty once the count is exhausted. Thread-safe across the concurrent work streams a module opens.- Returns:
- the next PipeStream to serve, or empty when the corpus is drained
-
reset
public void reset(int count) Reset the corpus to servecountfresh units (or the configured default whencount < 0).- Parameters:
count- the new unit budget, or negative to use the default
-
servedCount
public int servedCount()Returns the number of work units handed out so far, capped at the effective limit.- Returns:
- how many units have been handed out so far.
-
totalCount
public int totalCount()Returns the effective unit budget this corpus will serve before draining.- Returns:
- the total units this corpus will hand out before draining.
-