public class BlockRead 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, getReader()
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<BlockReader> |
getReader() |
boolean |
isRejected() |
public Peer getPeer()
public boolean isRejected()
public int getPieceIndex()
public int getOffset()
public int getLength()
public Optional<BlockReader> getReader()
Optional.empty()
,
if isRejected()
returns true or if getError()
is not emptypublic Optional<Throwable> getError()
Optional.empty()
if processing of the request completed normally,
or exception otherwise.Copyright © 2016–2021. All rights reserved.