本文整理汇总了Java中com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque类的典型用法代码示例。如果您正苦于以下问题:Java LIFOLinkedBlockingDeque类的具体用法?Java LIFOLinkedBlockingDeque怎么用?Java LIFOLinkedBlockingDeque使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LIFOLinkedBlockingDeque类属于com.nostra13.universalimageloader.core.assist.deque包,在下文中一共展示了LIFOLinkedBlockingDeque类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createExecutor
import com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque; //导入依赖的package包/类
/** Creates default implementation of task executor */
public static Executor createExecutor(int threadPoolSize, int threadPriority,
QueueProcessingType tasksProcessingType) {
boolean lifo = tasksProcessingType == QueueProcessingType.LIFO;
BlockingQueue<Runnable> taskQueue =
lifo ? new LIFOLinkedBlockingDeque<Runnable>() : new LinkedBlockingQueue<Runnable>();
return new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0L, TimeUnit.MILLISECONDS, taskQueue,
createThreadFactory(threadPriority, "uil-pool-"));
}
示例2: createExecutor
import com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque; //导入依赖的package包/类
public static Executor createExecutor(int threadPoolSize, int threadPriority,
QueueProcessingType tasksProcessingType) {
return new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0, TimeUnit.MILLISECONDS,
tasksProcessingType == QueueProcessingType.LIFO ? new LIFOLinkedBlockingDeque() :
new LinkedBlockingQueue(), createThreadFactory(threadPriority,
"uil-pool-"));
}
示例3: createExecutor
import com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque; //导入依赖的package包/类
/**
* Creates default implementation of task executor
* 任务执行者的构造方法,当前用于实现默认的task executor
*/
public static Executor createExecutor(int threadPoolSize, int threadPriority,
QueueProcessingType tasksProcessingType) {
//初始化队列算法类型 默认为LIFO
boolean lifo = tasksProcessingType == QueueProcessingType.LIFO;
//初始化队列 根据不同的算法类型,创建不同的队列
BlockingQueue<Runnable> taskQueue =
lifo ? new LIFOLinkedBlockingDeque<Runnable>() : new LinkedBlockingQueue<Runnable>();
return new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0L, TimeUnit.MILLISECONDS, taskQueue,
createThreadFactory(threadPriority, "uil-pool-"));
}
开发者ID:jiangqqlmj,项目名称:Android-Universal-Image-Loader-Modify,代码行数:15,代码来源:DefaultConfigurationFactory.java
示例4: createExecutor
import com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque; //导入依赖的package包/类
public static Executor createExecutor(int threadPoolSize, int threadPriority, QueueProcessingType tasksProcessingType) {
return new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0, TimeUnit.MILLISECONDS, tasksProcessingType == QueueProcessingType.LIFO ? new LIFOLinkedBlockingDeque() : new LinkedBlockingQueue(), createThreadFactory(threadPriority, "uil-pool-"));
}
示例5: createExecutor
import com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque; //导入依赖的package包/类
/** Creates default implementation of task executor */
public static Executor createExecutor(int threadPoolSize, int threadPriority, QueueProcessingType tasksProcessingType) {
boolean lifo = tasksProcessingType == QueueProcessingType.LIFO;
BlockingQueue<Runnable> taskQueue = lifo ? new LIFOLinkedBlockingDeque<Runnable>() : new LinkedBlockingQueue<Runnable>();
return new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0L, TimeUnit.MILLISECONDS, taskQueue, createThreadFactory(threadPriority));
}
示例6: createTaskExecutor
import com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque; //导入依赖的package包/类
private ExecutorService createTaskExecutor() {
boolean lifo = configuration.tasksProcessingType == QueueProcessingType.LIFO;
BlockingQueue<Runnable> taskQueue = lifo ? new LIFOLinkedBlockingDeque<Runnable>() : new LinkedBlockingQueue<Runnable>();
return new ThreadPoolExecutor(configuration.threadPoolSize, configuration.threadPoolSize, 0L, TimeUnit.MILLISECONDS, taskQueue,
DefaultConfigurationFactory.createThreadFactory(configuration.threadPriority));
}