Package icyllis.modernui.util
Class MpmcArrayQueue<E>
java.lang.Object
icyllis.modernui.util.MpmcArrayQueue<E>
- All Implemented Interfaces:
Pools.Pool<E>
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MpmcArrayQueue
public MpmcArrayQueue(int capacity)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
isFull
public boolean isFull() -
acquire
- Specified by:
acquire
in interfacePools.Pool<E>
- Returns:
- An instance from the pool if such, null otherwise.
-
release
Description copied from interface:Pools.Pool
Release an instance to the pool.- Specified by:
release
in interfacePools.Pool<E>
- Parameters:
instance
- The instance to release.- Returns:
- Whether the instance was put in the pool.
-