Class NetworkResponse
java.lang.Object
com.github.mizosoft.methanol.internal.cache.RawResponse
com.github.mizosoft.methanol.internal.cache.NetworkResponse
A
RawResponse that came from the network and may be written to cache.-
Method Summary
Modifier and TypeMethodDescriptionvoidDiscards the response body in background.<T> CompletableFuture<TrackedResponse<T>> handleAsync(HttpResponse.BodyHandler<T> handler, Executor executor) booleanstatic NetworkResponseof(TrackedResponse<Flow.Publisher<List<ByteBuffer>>> response) with(Consumer<ResponseBuilder<?>> mutator) writingWith(Store.Editor editor, Executor executor, CacheWritingPublisher.Listener writeListener, boolean synchronizeWrites) Methods inherited from class RawResponse
get, handle, toString
-
Method Details
-
writingWith
public NetworkResponse writingWith(Store.Editor editor, Executor executor, CacheWritingPublisher.Listener writeListener, boolean synchronizeWrites) -
discard
Discards the response body in background. -
isCacheUpdating
public boolean isCacheUpdating() -
with
- Specified by:
within classRawResponse
-
of
-
handleAsync
public <T> CompletableFuture<TrackedResponse<T>> handleAsync(HttpResponse.BodyHandler<T> handler, Executor executor) - Specified by:
handleAsyncin classRawResponse
-