Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.client.hotrod.impl.async;
 
 
Default implementation for org.infinispan.executors.ExecutorFactory based on an java.util.concurrent.ThreadPoolExecutor.

Author(s):
Mircea.Markus@jboss.com
Since:
4.1
public class DefaultAsyncExecutorFactory implements ExecutorFactory {
   public static final String THREAD_NAME = "HotRod-client-async-pool";
   public static final AtomicInteger counter = new AtomicInteger(0);
   @Override
      ThreadFactory tf = new ThreadFactory() {
         @Override
         public Thread newThread(Runnable r) {
            Thread th = new Thread(r + "-" + .getAndIncrement());
            th.setDaemon(true);
            return th;
         }
      };
                                    0L, .,
                                    new LinkedBlockingQueue<Runnable>(cp.getDefaultExecutorFactoryQueueSize()),
                                    tf);
   }
New to GrepCode? Check out our FAQ X