Code example for ThreadFactoryBuilder

0
  public MustacheTemplateEngine(ServletContext context)
  { 
    factory = new ServletMustacheFactory(context);
 
    ThreadFactory threadFactory =
      new ThreadFactoryBuilder().setNameFormat(THREAD_NAME).build();
 
    factory.setExecutorService(Executors.newCachedThreadPool(threadFactory));
  } 
 
  //~--- get methods ---------------------------------------------------------- 
 
  /** 
   * Method description 
   * 
   * 
   * @param templateIdentifier 
   * @param reader 
   * 
   * @return