diff options
| author | Roman / Linnea Gräf <roman.graef@gmail.com> | 2023-02-15 18:50:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-15 18:50:56 +0100 |
| commit | d3ca199f904cd72e419c6320eda261f023c71937 (patch) | |
| tree | 32ea0eb2ceac0e1cb24ab09b21f5e5581f809a39 /src/main/java/io/github/moulberry/notenoughupdates/util/MinecraftExecutor.java | |
| parent | e0ab2af457daf50b838248afbc4110c97a0c8b4a (diff) | |
| download | notenoughupdates-d3ca199f904cd72e419c6320eda261f023c71937.tar.gz notenoughupdates-d3ca199f904cd72e419c6320eda261f023c71937.tar.bz2 notenoughupdates-d3ca199f904cd72e419c6320eda261f023c71937.zip | |
ApiUtil: Add cache with per request timeout and per class histogram (#592)
* ApiUtil: Add cache with per request timeout and per class histogram
* MinionHelper: Only load minion helper data when needed
* Api: Make api response processing more async.
* Lower cache for /pv to 30 seconds and rename cacheDuration to max age
* Disk cache for the API
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/MinecraftExecutor.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/MinecraftExecutor.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/MinecraftExecutor.java b/src/main/java/io/github/moulberry/notenoughupdates/util/MinecraftExecutor.java deleted file mode 100644 index bf973b76..00000000 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/MinecraftExecutor.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2022 NotEnoughUpdates contributors - * - * This file is part of NotEnoughUpdates. - * - * NotEnoughUpdates is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation, either - * version 3 of the License, or (at your option) any later version. - * - * NotEnoughUpdates is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>. - */ - -package io.github.moulberry.notenoughupdates.util; - -import net.minecraft.client.Minecraft; -import org.jetbrains.annotations.NotNull; - -import java.util.concurrent.Executor; - -public class MinecraftExecutor implements Executor { - - public static MinecraftExecutor INSTANCE = new MinecraftExecutor(); - - private MinecraftExecutor() {} - - @Override - public void execute(@NotNull Runnable runnable) { - Minecraft.getMinecraft().addScheduledTask(runnable); - } -} |
