Code example for ThreadFactoryBuilder

0
 * 
 * @author pron 
 */ 
public class FiberFileChannel implements SeekableByteChannel, GatheringByteChannel, ScatteringByteChannel {
    private static final ExecutorService fiberFileThreadPool = Executors.newCachedThreadPool(
            new ThreadFactoryBuilder().setDaemon(true).setNameFormat("fiber-file-open-%d").build());
    private static final FileAttribute<?>[] NO_ATTRIBUTES = new FileAttribute[0];
 
    private final AsynchronousFileChannel ac;
    private long position;
 
    FiberFileChannel(AsynchronousFileChannel afc) {
        ac = afc;
    } 
 
    /** 
     * Opens or creates a file for reading and/or writing, returning a file channel to access the file. 
     * 
     * <p> 
     * The {@code options} parameter determines how the file is opened. 
Contextual code suggestions in your IDE  Get Codota for Java