Package org.voltdb.stream.api
Interface ExecutionContext.StreamExecutionContext
- Enclosing interface:
ExecutionContext
public static interface ExecutionContext.StreamExecutionContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
cancel()
default void
Emits a message into named sink after receiving exception.default boolean
long
nanoTime()
Creates and manages CompletableCommitResult.nextCommitResult
(Duration awaitTimeout) Creates and manages CompletableCommitResult.void
A logging helper method.default void
traceValue
(String name, Object value) In test environment the named value will be collected so those named values can be later examined.
-
Method Details
-
cancel
default void cancel() -
isCanceled
default boolean isCanceled() -
traceValue
In test environment the named value will be collected so those named values can be later examined. In other environments this method has no effect.- Parameters:
name
- of the tracevalue
- to collect
-
trace
A logging helper method. SeeString.format(String, Object...)
.- Parameters:
format
- of the traceparams
- zero or more params that will be passed to formatting method
-
nanoTime
long nanoTime()- Returns:
- current nano time counted from Epoch
-
nextCommitResult
CompletableCommitResult nextCommitResult()Creates and manages CompletableCommitResult. Such result is needed when commit is asynchronous, and we don't want to block execution of the thread that is calling commit method. The result will be invalidated afterDEFAULT_ASYNC_COMMIT_TIMEOUT
, which may result with halting stream processing. The default timeout can be modified in runtime by settinga property
- Returns:
- CompletableCommitResult
-
nextCommitResult
Creates and manages CompletableCommitResult. Such result is needed when commit is asynchronous, and we don't want to block execution of the thread that is calling commit method. The result will be invalidated afterDEFAULT_ASYNC_COMMIT_TIMEOUT
, which may result with halting stream processing.- Parameters:
awaitTimeout
- custom timeout to wait- Returns:
- CompletableCommitResult
-
emit
Emits a message into named sink after receiving exception. A sink can be registered usingExceptionHandlerBuilder.addNamedSink(String, VoltStreamSink)
andExceptionHandlerBuilder.addNamedSink(String, VoltStreamSinkConfigurator)
. Note: This method is not designed to route messages between sinks, as those additional, named sinks cannot be guarded for failure.- Parameters:
sinkName
-message
-
-