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 record
static final record
static interface
static final record
-
Method Summary
Modifier and TypeMethodDescriptionint
attachInvocation
(String invocationId) call
(Target target, Slice payload, @Nullable String idempotencyKey, @Nullable Collection<Map.Entry<String, String>> headers) void
cancelInvocation
(String targetInvocationId) void
completeAwakeable
(String awakeableId, Slice value) void
completeAwakeable
(String awakeableId, TerminalException exception) void
completeSignal
(String targetInvocationId, String signalName, Slice value) void
completeSignal
(String targetInvocationId, String signalName, TerminalException exception) int
createSignalHandle
(String signalName) doProgress
(List<Integer> anyHandle) void
end()
int
getInvocationOutput
(String invocationId) static StateMachine
init
(HeadersAccessor headersAccessor, EndpointRequestHandler.LoggingContextSetter loggingContextSetter) @Nullable StateMachine.Input
input()
boolean
isCompleted
(int handle) int
promiseComplete
(String key, Slice value) int
promiseComplete
(String key, TerminalException exception) int
promiseGet
(String key) int
promisePeek
(String key) void
proposeRunCompletion
(int handle, Slice value) void
proposeRunCompletion
(int handle, Throwable exception, Duration attemptDuration, RetryPolicy retryPolicy) int
int
send
(Target target, Slice payload, @Nullable String idempotencyKey, @Nullable Collection<Map.Entry<String, String>> headers, @Nullable Duration delay) int
state()
void
stateClear
(String key) void
int
int
void
takeNotification
(int handle) void
writeOutput
(Slice value) void
writeOutput
(TerminalException exception) Methods inherited from interface java.util.concurrent.Flow.Publisher
subscribe
Methods 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()
-