- All Known Implementing Classes:
AsyncFetchStatus.CompletedWithException,AsyncFetchStatus.NonePending,AsyncFetchStatus.Pending
public sealed interface AsyncFetchStatus
permits AsyncFetchStatus.NonePending, AsyncFetchStatus.Pending
Asynchronous fetch status.
- Since:
- 6
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classSignals an async fetch which completed with an exception.static final classSignals no async fetch pending.static classSignals an async fetch pending. -
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncFetchStatusstatic AsyncFetchStatuscompletedWithException(SQLException exception) default Optional<SQLException>booleanIs this a status signalling an async fetch is pending (which includes having completed with an exception).static AsyncFetchStatusstatic AsyncFetchStatuspending()
-
Method Details
-
isPending
boolean isPending()Is this a status signalling an async fetch is pending (which includes having completed with an exception).- Returns:
trueif this status is pending
-
exception
- Returns:
- exception from the last unsuccessfully completed asynchronous fetch
-
nonePending
- Returns:
- status instance which represents no asynchronous fetch is pending
-
pending
- Returns:
- status instance which represents a pending asynchronous fetch
-
completed
- Returns:
- status instance which represents a successfully completed asynchronous fetch (same as
nonePending()) - See Also:
-
completedWithException
- Parameters:
exception- exception resulting from the asynchronous completion- Returns:
- status instance which represents an asynchronous fetch which completed with an exception; this is considered a still pending operation, where the pending action is throwing the exception
-