Package net.minestom.server.utils
Class ObjectPool<T>
java.lang.Object
net.minestom.server.utils.ObjectPool<T>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ObjectPool
<BinaryBuffer> static final ObjectPool
<ByteBuffer> -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
clear()
int
count()
get()
getAndRegister
(@NotNull Object ref) ObjectPool<T>.@NotNull Holder
hold()
void
register
(@NotNull Object ref, @NotNull Collection<T> objects) void
register
(@NotNull Object ref, @NotNull AtomicReference<T> objectRef) void
<R> R
-
Field Details
-
BUFFER_POOL
-
PACKET_POOL
-
-
Method Details
-
get
-
getAndRegister
-
add
-
clear
public void clear() -
count
public int count() -
register
-
register
-
register
-
hold
-
use
-