Example usage for java.util.concurrent PriorityBlockingQueue PriorityBlockingQueue

List of usage examples for java.util.concurrent PriorityBlockingQueue PriorityBlockingQueue

Introduction

In this page you can find the example usage for java.util.concurrent PriorityBlockingQueue PriorityBlockingQueue.

Prototype

public PriorityBlockingQueue() 

Source Link

Document

Creates a PriorityBlockingQueue with the default initial capacity (11) that orders its elements according to their Comparable natural ordering .

Usage

From source file:gobblin.compaction.mapreduce.MRCompactor.java

private JobRunnerExecutor createJobExecutor() {
    int threadPoolSize = getThreadPoolSize();
    BlockingQueue<Runnable> queue = new PriorityBlockingQueue<Runnable>();
    return new JobRunnerExecutor(threadPoolSize, threadPoolSize, Long.MAX_VALUE, TimeUnit.NANOSECONDS, queue);
}

From source file:org.jiemamy.utils.collection.CollectionsUtil.java

/**
 * {@link PriorityBlockingQueue}?????/*from   ww  w. j a va2s . com*/
 * 
 * @param <E> {@link PriorityBlockingQueue}??
 * @return {@link PriorityBlockingQueue}???
 * @see PriorityBlockingQueue#PriorityBlockingQueue()
 */
public static <E> PriorityBlockingQueue<E> newPriorityBlockingQueue() {
    return new PriorityBlockingQueue<E>();
}