From 9f0ccefeffb9fd87fb0815909933fe08366a35b9 Mon Sep 17 00:00:00 2001 From: Glavo Date: Sat, 2 Aug 2025 15:46:30 +0800 Subject: [PATCH] update --- .../org/jackhuang/hmcl/task/FetchTask.java | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/task/FetchTask.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/task/FetchTask.java index 21d59d105..2b88ee66f 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/task/FetchTask.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/task/FetchTask.java @@ -300,43 +300,6 @@ public abstract class FetchTask extends Task { CACHED } - protected static final class DownloadState { - private final int startPosition; - private final int endPosition; - private final int currentPosition; - private final boolean finished; - - public DownloadState(int startPosition, int endPosition, int currentPosition) { - if (currentPosition < startPosition || currentPosition > endPosition) { - throw new IllegalArgumentException("Illegal download state: start " + startPosition + ", end " + endPosition + ", cur " + currentPosition); - } - this.startPosition = startPosition; - this.endPosition = endPosition; - this.currentPosition = currentPosition; - finished = currentPosition == endPosition; - } - - public int getStartPosition() { - return startPosition; - } - - public int getEndPosition() { - return endPosition; - } - - public int getCurrentPosition() { - return currentPosition; - } - - public boolean isFinished() { - return finished; - } - } - - protected static final class DownloadMission { - - } - public static int DEFAULT_CONCURRENCY = Math.min(Runtime.getRuntime().availableProcessors() * 4, 64); private static int downloadExecutorConcurrency = DEFAULT_CONCURRENCY; private static volatile ThreadPoolExecutor DOWNLOAD_EXECUTOR;