Code example for ThreadFactoryBuilder

0
        return new ThreadPoolExecutor(getWorkerThreads(),
                                      getWorkerThreads(), 
                                      0L, 
                                      TimeUnit.MILLISECONDS,
                                      queue,
                                      new ThreadFactoryBuilder().setNameFormat("thrift-worker-%s").build(),
                                      new ThreadPoolExecutor.AbortPolicy());
    } 
 
    /** 
     * Sets the name of the transport (frame codec) that this server will handle. The available 
     * options by default are 'unframed', 'buffered', and 'framed'. Additional modules may install 
     * other options. Server startup will fail if you specify an unavailable transport here. 
     * 
     * @param transportName The name of the transport 
     * @return This {@link ThriftServerConfig} instance 
     */ 
    @Config("thrift.transport")
    public ThriftServerConfig setTransportName(String transportName)
    { 
Experience pair programming with AI  Get Codota for Java