Examples of DefaultThreadFactory


Examples of org.jgroups.util.DefaultThreadFactory

    static AtomicInteger conn_creations=new AtomicInteger(0);

    final static long   MAX_JOIN_TIMEOUT=Global.THREAD_SHUTDOWN_WAIT_TIME;

    protected BasicConnectionTable() {       
        factory = new DefaultThreadFactory(new ThreadGroup(Util.getGlobalThreadGroup(),"ConnectionTable"),"Connection Table", false);
    }
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

    static AtomicInteger conn_creations=new AtomicInteger(0);

    final static long   MAX_JOIN_TIMEOUT=Global.THREAD_SHUTDOWN_WAIT_TIME;

    protected BasicConnectionTable() {       
        factory = new DefaultThreadFactory(new ThreadGroup(Util.getGlobalThreadGroup(),"ConnectionTable"),"Connection Table", false);
    }
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

            return null;
        }

        public ThreadFactory getThreadFactory() {
            if(global_thread_factory==null)
                global_thread_factory=new DefaultThreadFactory(Util.getGlobalThreadGroup(), "", false);
            return global_thread_factory;
        }
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

    static AtomicInteger conn_creations=new AtomicInteger(0);

    final static long   MAX_JOIN_TIMEOUT=Global.THREAD_SHUTDOWN_WAIT_TIME;

    protected BasicConnectionTable() {
        factory = new DefaultThreadFactory(new ThreadGroup(Util.getGlobalThreadGroup(),"ConnectionTable"),"Connection Table", false);
    }
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

    static AtomicInteger conn_creations=new AtomicInteger(0);

    final static long   MAX_JOIN_TIMEOUT=Global.THREAD_SHUTDOWN_WAIT_TIME;

    protected BasicConnectionTable() {
        factory = new DefaultThreadFactory(new ThreadGroup(Util.getGlobalThreadGroup(),"ConnectionTable"),"Connection Table", false);
    }
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

    static AtomicInteger conn_creations=new AtomicInteger(0);

    final static long   MAX_JOIN_TIMEOUT=Global.THREAD_SHUTDOWN_WAIT_TIME;

    protected BasicConnectionTable() {
        factory = new DefaultThreadFactory(new ThreadGroup(Util.getGlobalThreadGroup(),"ConnectionTable"),"Connection Table", false);
    }
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

    static AtomicInteger conn_creations=new AtomicInteger(0);

    final static long   MAX_JOIN_TIMEOUT=Global.THREAD_SHUTDOWN_WAIT_TIME;

    protected BasicConnectionTable() {       
        factory = new DefaultThreadFactory(new ThreadGroup(Util.getGlobalThreadGroup(),"ConnectionTable"),"Connection Table", false);
    }
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

   private void fixProtocolThreadFactories(TP tp, ThreadDecoratorImpl threadDecorator)
   {
      ThreadFactory stackFactory = tp.getThreadFactory();
      if (stackFactory == null)
      {
         stackFactory = new DefaultThreadFactory(Util.getGlobalThreadGroup(), "", false);
         tp.setThreadFactory(stackFactory);
      }
      fixThreadManager(stackFactory, threadDecorator, "TP.getThreadFactory()");
     
      log.debug("Fixed thread factory for " + tp);
     
      ThreadFactory timerFactory = tp.getTimerThreadFactory();
      if (timerFactory == null)
      {
         timerFactory = new LazyThreadFactory(Util.getGlobalThreadGroup(), "Timer", true, true);
         tp.setTimerThreadFactory(timerFactory);           
      }
      fixThreadManager(timerFactory, threadDecorator, "TP.getTimerThreadFactory()");
     
      log.debug("Fixed timer thread factory for " + tp);
     
      ThreadGroup pool_thread_group = null;
      if (tp.isDefaulThreadPoolEnabled())
      {
         ThreadFactory defaultPoolFactory = tp.getDefaultThreadPoolThreadFactory();
         if (defaultPoolFactory == null)
         {
            pool_thread_group=new ThreadGroup(Util.getGlobalThreadGroup(), "Thread Pools");
            defaultPoolFactory = new DefaultThreadFactory(pool_thread_group, "Incoming", false, true);
            tp.setThreadFactory(defaultPoolFactory);
         }
         fixThreadManager(defaultPoolFactory, threadDecorator, "TP.getDefaultThreadPoolThreadFactory()");
        
         log.debug("Fixed default pool thread factory for " + tp);
      }
     
      if (tp.isOOBThreadPoolEnabled())
      {
         ThreadFactory oobPoolFactory = tp.getOOBThreadPoolThreadFactory();
         if (oobPoolFactory == null)
         {
            if (pool_thread_group == null)
               pool_thread_group=new ThreadGroup(Util.getGlobalThreadGroup(), "Thread Pools");
            oobPoolFactory = new DefaultThreadFactory(pool_thread_group, "OOB", false, true);
            tp.setThreadFactory(oobPoolFactory);
         }
         fixThreadManager(oobPoolFactory, threadDecorator, "TP.getOOBThreadPoolThreadFactory()");
        
         log.debug("Fixed oob pool thread factory for " + tp);
View Full Code Here

Examples of org.jgroups.util.DefaultThreadFactory

    private static final String BASE="base";
    private static final String ADDR="192.168.1.5:12345";
    private static final String CLUSTER="MyCluster";

    public void testNoNumbering() {
        factory=new DefaultThreadFactory(BASE, true, false);
        Thread thread=factory.newThread(new MyRunnable(), BASE);
        String name=thread.getName();
        System.out.println("name = " + name);
        assert name.equals(BASE);
    }
View Full Code Here

Examples of org.tamacat.httpd.util.DefaultThreadFactory

   * of {@code ExecutorService}.
   * @return {@link ThreadPoolExecutor}
   */
  public ExecutorService getExecutorService(int maxThreads) {
    if (maxThreads > 0) {
      return Executors.newFixedThreadPool(maxThreads, new DefaultThreadFactory(threadName));
    } else {
      return Executors.newCachedThreadPool(new DefaultThreadFactory(threadName));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.