Java provides an unbounded thread-safe priority blocking queue based on a priority heap via PriorityBlockingQueue.
Creating PriorityBlockingQueue can easily be done as follows:
BlockingQueue<Integer> queue = new PriorityBlockingQueue<>();
The non-thread-safe version is named PriorityQueue.