Code example for LinkedBlockingDeque

0
class UnknownCommandProcessor implements RequestProcessor 
{ 
	 
	private static final ExecutorService UNKNOWN_COMMAND_PROCESSOR_EXECUTOR = 
			new ThreadPoolExecutor(1, 1, Integer.MAX_VALUE, TimeUnit.DAYS, 
			                       new LinkedBlockingDeque<Runnable>());
 
	@Override 
	public ExecutorService getExecutorService() {
		return UNKNOWN_COMMAND_PROCESSOR_EXECUTOR;
	} 
 
	@Override 
	public DatabusRequest process(DatabusRequest request) throws IOException {
		request.setError(new UnknownCommandException(request.getName()));
		return request;
	} 
 
}