public class BlockWrite extends Object
isRejected()
returns true,
this means that the request was not accepted by the data worker.
If getError()
is not empty,
this means that an exception happened during the request processing.
Subsequently, getVerificationFuture()
will return Optional.empty()
in both cases.Modifier and Type | Method and Description |
---|---|
Optional<Throwable> |
getError() |
int |
getLength() |
int |
getOffset() |
Peer |
getPeer() |
int |
getPieceIndex() |
Optional<CompletableFuture<Boolean>> |
getVerificationFuture()
Get future, that will complete when the block is verified.
|
boolean |
isRejected() |
public Peer getPeer()
public boolean isRejected()
public int getPieceIndex()
public int getOffset()
public int getLength()
public Optional<Throwable> getError()
Optional.empty()
if processing of the request completed normally,
or exception otherwise.public Optional<CompletableFuture<Boolean>> getVerificationFuture()
Optional.empty()
,
if isRejected()
returns true or getError()
is not empty.Copyright © 2016–2021. All rights reserved.