public class ChunkIOExecutor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
BASE_THREADS |
private static int |
PLAYERS_PER_THREAD |
private static java.util.concurrent.ThreadPoolExecutor |
pool |
private static java.util.Map<QueuedChunk,ChunkIOProvider> |
tasks |
Constructor and Description |
---|
ChunkIOExecutor() |
Modifier and Type | Method and Description |
---|---|
static void |
adjustPoolSize(int players) |
static void |
dropQueuedChunkLoad(World world,
int x,
int z,
java.lang.Runnable runnable) |
static void |
queueChunkLoad(World world,
AnvilChunkLoader loader,
ChunkProviderServer provider,
int x,
int z,
java.lang.Runnable runnable) |
static Chunk |
syncChunkLoad(World world,
AnvilChunkLoader loader,
ChunkProviderServer provider,
int x,
int z) |
static void |
tick() |
private static final int BASE_THREADS
private static final int PLAYERS_PER_THREAD
private static final java.util.Map<QueuedChunk,ChunkIOProvider> tasks
private static final java.util.concurrent.ThreadPoolExecutor pool
public static Chunk syncChunkLoad(World world, AnvilChunkLoader loader, ChunkProviderServer provider, int x, int z)
public static void queueChunkLoad(World world, AnvilChunkLoader loader, ChunkProviderServer provider, int x, int z, java.lang.Runnable runnable)
public static void dropQueuedChunkLoad(World world, int x, int z, java.lang.Runnable runnable)
public static void adjustPoolSize(int players)
public static void tick()