当前位置: 首页>>代码示例>>Java>>正文


Java LIFOLinkedBlockingDeque类代码示例

本文整理汇总了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-"));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:DefaultConfigurationFactory.java

示例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-"));
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:DefaultConfigurationFactory.java

示例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-"));
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:DefaultConfigurationFactory.java

示例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));
}
 
开发者ID:Apokrif,项目名称:morse,代码行数:7,代码来源:DefaultConfigurationFactory.java

示例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));
}
 
开发者ID:jixieshi999,项目名称:juahya,代码行数:7,代码来源:ImageLoaderEngine.java


注:本文中的com.nostra13.universalimageloader.core.assist.deque.LIFOLinkedBlockingDeque类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。