public class StorageIoWorker extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
(package private) static class |
StorageIoWorker.Priority |
(package private) static class |
StorageIoWorker.Result |
Modifier and Type | Field and Description |
---|---|
private AtomicBoolean |
closed |
private TaskExecutor<TaskQueue.PrioritizedTask> |
field_24468 |
private static Logger |
LOGGER |
private Map<ChunkPos,StorageIoWorker.Result> |
results |
private RegionBasedStorage |
storage |
Modifier | Constructor and Description |
---|---|
protected |
StorageIoWorker(File file,
boolean bool,
String string) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
CompletableFuture<Void> |
completeAll() |
CompoundTag |
getNbt(ChunkPos pos) |
private void |
method_27945() |
private <T> CompletableFuture<T> |
run(Supplier<com.mojang.datafixers.util.Either<T,Exception>> supplier) |
CompletableFuture<Void> |
setResult(ChunkPos pos,
CompoundTag nbt) |
private void |
write(ChunkPos pos,
StorageIoWorker.Result result) |
private void |
writeResult() |
private static final Logger LOGGER
private final AtomicBoolean closed
private final TaskExecutor<TaskQueue.PrioritizedTask> field_24468
private final RegionBasedStorage storage
private final Map<ChunkPos,StorageIoWorker.Result> results
public CompletableFuture<Void> setResult(ChunkPos pos, CompoundTag nbt)
@Nullable public CompoundTag getNbt(ChunkPos pos) throws IOException
IOException
public CompletableFuture<Void> completeAll()
private <T> CompletableFuture<T> run(Supplier<com.mojang.datafixers.util.Either<T,Exception>> supplier)
private void writeResult()
private void method_27945()
private void write(ChunkPos pos, StorageIoWorker.Result result)
public void close() throws IOException
close
in interface AutoCloseable
IOException