Interface StateMachine
- All Superinterfaces:
Flow.Processor<Slice,,Slice> Flow.Publisher<Slice>,Flow.Subscriber<Slice>
More or less same as the VM trait
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic interfacestatic final record -
Method Summary
Modifier and TypeMethodDescriptionintattachInvocation(String invocationId) call(Target target, Slice payload, @Nullable String idempotencyKey, @Nullable Collection<Map.Entry<String, String>> headers) voidcancelInvocation(String targetInvocationId) voidcompleteAwakeable(String awakeableId, Slice value) voidcompleteAwakeable(String awakeableId, TerminalException exception) voidcompleteSignal(String targetInvocationId, String signalName, Slice value) voidcompleteSignal(String targetInvocationId, String signalName, TerminalException exception) intcreateSignalHandle(String signalName) doProgress(List<Integer> anyHandle) voidend()intgetInvocationOutput(String invocationId) static StateMachineinit(HeadersAccessor headersAccessor, EndpointRequestHandler.LoggingContextSetter loggingContextSetter) @Nullable StateMachine.Inputinput()booleanisCompleted(int handle) intpromiseComplete(String key, Slice value) intpromiseComplete(String key, TerminalException exception) intpromiseGet(String key) intpromisePeek(String key) voidproposeRunCompletion(int handle, Slice value) voidproposeRunCompletion(int handle, Throwable exception, Duration attemptDuration, RetryPolicy retryPolicy) intintsend(Target target, Slice payload, @Nullable String idempotencyKey, @Nullable Collection<Map.Entry<String, String>> headers, @Nullable Duration delay) intstate()voidstateClear(String key) voidintintvoidtakeNotification(int handle) voidwriteOutput(Slice value) voidwriteOutput(TerminalException exception) Methods inherited from interface java.util.concurrent.Flow.Publisher
subscribeMethods inherited from interface java.util.concurrent.Flow.Subscriber
onComplete, onError, onNext, onSubscribe
-
Method Details
-
init
static StateMachine init(HeadersAccessor headersAccessor, EndpointRequestHandler.LoggingContextSetter loggingContextSetter) -
getResponseContentType
String getResponseContentType() -
waitForReady
CompletableFuture<Void> waitForReady() -
waitNextInputSignal
CompletableFuture<Void> waitNextInputSignal() -
doProgress
-
isCompleted
boolean isCompleted(int handle) -
takeNotification
-
input
@Nullable StateMachine.Input input() -
stateGet
-
stateGetKeys
int stateGetKeys() -
stateSet
-
stateClear
-
stateClearAll
void stateClearAll() -
sleep
-
call
StateMachine.CallHandle call(Target target, Slice payload, @Nullable String idempotencyKey, @Nullable Collection<Map.Entry<String, String>> headers) -
send
-
awakeable
StateMachine.Awakeable awakeable() -
completeAwakeable
-
completeAwakeable
-
createSignalHandle
-
completeSignal
-
completeSignal
-
promiseGet
-
promisePeek
-
promiseComplete
-
promiseComplete
-
run
-
proposeRunCompletion
-
proposeRunCompletion
void proposeRunCompletion(int handle, Throwable exception, Duration attemptDuration, RetryPolicy retryPolicy) -
cancelInvocation
-
attachInvocation
-
getInvocationOutput
-
writeOutput
-
writeOutput
-
end
void end() -
state
InvocationState state()
-