@Override
  protected <T> RunnableFuture<T> newTaskFor(final Runnable runnable, final T value) {
    if (runnable instanceof RunnableWithPriority) {
      return new PriorityFutureTask<T>(((RunnableWithPriority)runnable).getPriority(), runnable, value);
    }
    return new PriorityFutureTask<T>(Priority.NORMAL, runnable, value);
  }
Priority based thread pool executor which takes priority of the task to be executed into account.
app/com/linkedin/drelephant/priorityexecutor/PriorityBasedThreadPoolExecutor.java