Code example for LinkedBlockingDeque

0
	public static final int KEEP_ALIVE_TIME = 0; 
	private static ThreadExecutor instance; 
		 
	public ThreadExecutor() { 
		super(CORE_POOL_SIZE, MAXIMUM_POOL_SIZE, KEEP_ALIVE_TIME, 
				TimeUnit.MILLISECONDS, new LinkedBlockingDeque<Runnable>()); 
	} 
 
	/** 
	 * @return the instance 
	 */ 
	public static ThreadExecutor getInstance() { 
		if (instance == null) { 
			return instance = new ThreadExecutor(); 
		} 
		return instance; 
	} 
 
}