@@ -0,0 +1,1967 @@
+/*%0A * Copyright (c) 2013-2017 Cinchapi Inc.%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.cinchapi.common.collect.concurrent;%0A%0Aimport java.util.concurrent.ThreadFactory;%0A%0Aimport com.google.common.util.concurrent.ThreadFactoryBuilder;%0A%0A/**%0A * Factory methods for creating %7B@link ThreadFactory%7D objects. OOP design%0A * principals for the win (note sarcasm).%0A * %0A * @author Jeff Nelson%0A */%0Apublic class ThreadFactories %7B%0A%0A    /**%0A     * Return a %7B@link ThreadFactory%7D that uses the specified %7B@code nameFormat%7D%0A     * for new threads.%0A     * %0A     * @param nameFormat the name format for new threads%0A     * @return a %7B@link ThreadFactory%7D configured to name new threads using the%0A     *         %7B@code nameFormat%7D and all other default options%0A     */%0A    public static ThreadFactory namingThreadFactory(String nameFormat) %7B%0A        return new ThreadFactoryBuilder().setNameFormat(nameFormat).build();%0A    %7D%0A%0A    /**%0A     * Return a %7B@link ThreadFactory%7D that uses the specified %7B@code nameFormat%7D%0A     * for new daemon threads.%0A     * %0A     * @param nameFormat the name format for new threads%0A     * @return a %7B@link ThreadFactory%7D configured to name new threads using the%0A     *         %7B@code nameFormat%7D and all other default options%0A     */%0A    public static ThreadFactory namingDaemonThreadFactory(String nameFormat) %7B%0A        return new ThreadFactoryBuilder().setNameFormat(nameFormat)%0A                .setDaemon(true).build();%0A    %7D%0A%0A%7D%0A

add ThreadFactories util class