public class LevelPrioritizedQueue<T> extends Object
Modifier and Type | Field and Description |
---|---|
private it.unimi.dsi.fastutil.longs.LongSet |
blockingChunks |
private int |
firstNonEmptyLevel |
static int |
LEVEL_COUNT |
private List<it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<List<Optional<T>>>> |
levelToPosToElements |
private int |
maxBlocking |
private String |
name |
Constructor and Description |
---|
LevelPrioritizedQueue(String name,
int maxSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
add(Optional<T> element,
long pos,
int level) |
private Runnable |
createBlockingAdder(long pos) |
(package private) it.unimi.dsi.fastutil.longs.LongSet |
getBlockingChunks() |
Stream<com.mojang.datafixers.util.Either<T,Runnable>> |
poll() |
protected void |
remove(long pos,
boolean removeElement) |
String |
toString() |
protected void |
updateLevel(int fromLevel,
ChunkPos pos,
int toLevel) |
public static final int LEVEL_COUNT
private final List<it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<List<Optional<T>>>> levelToPosToElements
private volatile int firstNonEmptyLevel
private final String name
private final it.unimi.dsi.fastutil.longs.LongSet blockingChunks
private final int maxBlocking
public LevelPrioritizedQueue(String name, int maxSize)