X-Git-Url: https://git.pterodactylus.net/?p=jFCPlib.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2FRequestProgress.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Ffcp%2FRequestProgress.java;h=2dcc1099f2c7ba5ce8e3563d807261b6e5cfd71c;hp=0000000000000000000000000000000000000000;hb=6f3644e995d50f4d4e47b81985b298ad8dc50751;hpb=7248c3c147855a9bc81685d7cce50d393e5bace4 diff --git a/src/main/java/net/pterodactylus/fcp/RequestProgress.java b/src/main/java/net/pterodactylus/fcp/RequestProgress.java new file mode 100644 index 0000000..2dcc109 --- /dev/null +++ b/src/main/java/net/pterodactylus/fcp/RequestProgress.java @@ -0,0 +1,63 @@ +package net.pterodactylus.fcp; + +/** + * Progress information about a request. + * + * @author David ‘Bombe’ Roden + */ +public class RequestProgress { + + private final int total; + private final int required; + private final int failed; + private final int fatallyFailed; + private final long lastProgress; + private final int succeeded; + private final boolean finalizedTotal; + private final int minSuccessFetchBlocks; + + public RequestProgress(int total, int required, int failed, int fatallyFailed, long lastProgress, int succeeded, + boolean finalizedTotal, int minSuccessFetchBlocks) { + this.total = total; + this.required = required; + this.failed = failed; + this.fatallyFailed = fatallyFailed; + this.lastProgress = lastProgress; + this.succeeded = succeeded; + this.finalizedTotal = finalizedTotal; + this.minSuccessFetchBlocks = minSuccessFetchBlocks; + } + + public int getTotal() { + return total; + } + + public int getRequired() { + return required; + } + + public int getFailed() { + return failed; + } + + public int getFatallyFailed() { + return fatallyFailed; + } + + public long getLastProgress() { + return lastProgress; + } + + public int getSucceeded() { + return succeeded; + } + + public boolean isFinalizedTotal() { + return finalizedTotal; + } + + public int getMinSuccessFetchBlocks() { + return minSuccessFetchBlocks; + } + +}