Class StreamingRunner.StreamingOperation
java.lang.Object
neqsim.mcp.runners.StreamingRunner.StreamingOperation
- Enclosing class:
StreamingRunner
Internal state for a streaming operation.
- Version:
- 1.0
- Author:
- Even Solbraa
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanWhether cancellation was requested.(package private) intNumber of completed steps.(package private) StringError message if failed.(package private) final StringOperation ID.private final List<com.google.gson.JsonObject> Incremental results.(package private) StringCurrent status: pending, running, completed, failed, cancelled.(package private) intTotal expected steps.(package private) final StringOperation type. -
Constructor Summary
ConstructorsConstructorDescriptionStreamingOperation(String operationId, String type) Creates a new streaming operation. -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddResult(com.google.gson.JsonObject result) Adds a result point.(package private) intGets the total result count.(package private) List<com.google.gson.JsonObject> getResultsSince(int fromIndex) Gets results added since the given index.
-
Field Details
-
operationId
Operation ID. -
type
Operation type. -
status
Current status: pending, running, completed, failed, cancelled. -
completedSteps
volatile int completedStepsNumber of completed steps. -
totalSteps
volatile int totalStepsTotal expected steps. -
cancelled
volatile boolean cancelledWhether cancellation was requested. -
errorMessage
Error message if failed. -
results
Incremental results.
-
-
Constructor Details
-
StreamingOperation
-
-
Method Details
-
addResult
void addResult(com.google.gson.JsonObject result) Adds a result point.- Parameters:
result- the result
-
getResultsSince
Gets results added since the given index.- Parameters:
fromIndex- the start index- Returns:
- new results
-
getResultCount
int getResultCount()Gets the total result count.- Returns:
- the count
-