title: Java Concurrency: How to select and configure Executors
body: <p>The Java Concurrency API gives you <code>Executor</code> and <code>ExecutorService</code> interfaces to build from, and ships with several concrete implementations (<code>ThreadPoolExecutor</code> and <code>ScheduledThreadPoolExecutor</code>).</p>
  
  <p>I'm completely new to Java Concurrency, and am having difficulty finding answers to several very-similarly-related questions. Rather than cluttering SO with all these tiny questions I decided to bundle them together, because there's probably a way to answer them all in one fell swoop (probably because I'm not seeing the whole picture here):</p>
  
  <ul>
  <li>Is it common practice to implement your own <code>Executor</code>/<code>ExecutorService</code>? In what cases would you do this instead of using the two concretions I mention above? In what cases are the two concretions preferable over something "homegrown"?</li>
  <li>I don't understand how all of the concurrent collections relate to <code>Executor</code>s. For instance, does <code>ThreadPoolExecutor</code> use, say, <code>ConcurrentLinkedQueue</code> under the hood to queue up submitted tasks? Or are you (the API developer) supposed to select and use, say, <code>ConcurrentLinkedQueue</code> inside your parallelized <code>run()</code> method? Basicaly, are the concurrent collections there to be used internally by the <code>Executor</code>s, or do you use them to help write non-blocking algorithms?</li>
  <li>Can you configure which concurrent collections an <code>Executor</code> uses under the hood (to store submitted tasks), and is this common practice?</li>
  </ul>
  
  <p>Thanks in advance!</p>