Here you can find the source of getExecutorService()
public static synchronized ExecutorService getExecutorService()
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w w w . j a v a 2s. c o m*/ * Tasktop Technologies - initial API and implementation * Michael Valenta - improvements *******************************************************************************/ import java.util.concurrent.ExecutorService; import java.util.concurrent.SynchronousQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class Main { private static final int MAX_CONCURRENT_REQUESTS = 100; private static ExecutorService service; public static synchronized ExecutorService getExecutorService() { if (service == null) { service = new ThreadPoolExecutor(1, MAX_CONCURRENT_REQUESTS, 10L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>()); } return service; } }