Here you can find the source of createThreadFactory(String namePrefix)
public static ThreadFactory createThreadFactory(String namePrefix)
//package com.java2s; //License from project: Apache License import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.util.concurrent.ThreadFactory; public class Main { public static ThreadFactory createThreadFactory(String namePrefix) { return new ThreadFactoryBuilder().setDaemon(true).setNameFormat(namePrefix + "-%d").build(); }/*from w w w . j av a 2 s. c om*/ }