Interface SyscallCallback<T>

    • Method Detail

      • onSuccess

        void onSuccess​(@Nullable T value)
      • onCancel

        void onCancel​(java.lang.Throwable t)
        The internal state machine invokes this method when a syscall is interrupted due to a suspension, or a network error.

        In case the user code is blocked on a lock, the implementation of this method should unblock it.

      • of

        static <T> SyscallCallback<T> of​(java.util.function.Consumer<T> onSuccess,
                                         java.util.function.Consumer<java.lang.Throwable> onFailure)
      • ofVoid

        static SyscallCallback<java.lang.Void> ofVoid​(java.lang.Runnable onSuccess,
                                                      java.util.function.Consumer<java.lang.Throwable> onFailure)
      • completingFuture

        static <T> SyscallCallback<T> completingFuture​(java.util.concurrent.CompletableFuture<T> fut)