Examples of ThreadPool


Examples of org.jboss.util.threadpool.ThreadPool

      Object realParam = objs[0];
      invocation.setParameter(realParam);

      final InvocationRequest newInvocation = invocation;

      ThreadPool executor = getOnewayThreadPool();
      Runnable onewayRun = new Runnable()
      {
         public void run()
         {
            try
            {
               invoke(newInvocation);
            }
            catch(Throwable e)
            {
               // throw away exception since can't get it back to original caller
               log.error("Error executing server oneway invocation request: " + newInvocation, e);
            }
         }
      };

      if(trace) { log.trace(this + " placing " + invocation + " in onewayThreadPool"); }
      executor.run(onewayRun);
   }
View Full Code Here

Examples of org.jgroups.util.ThreadPool

    }

   

    public static void main(String[] args) {
  ThreadPool      pool=new ThreadPool(5);
  ReusableThread  t;
  MyThread        my=new MyThread(1);
  int             i=0;

  while(true) {
      t=pool.getThread();
      my.num=i++;

      if(t != null) {
    System.out.println("Assigning task");
    t.assignTask(my);
View Full Code Here

Examples of org.jpos.util.ThreadPool

    protected void initService () throws Exception {
        QFactory factory = getServer().getFactory();
        dirPoll  = createDirPoll();
        dirPoll.setPath (getPath ());
        dirPoll.setThreadPool (new ThreadPool (1, poolSize));
        dirPoll.setPollInterval (pollInterval);
        if (priorities != null)
            dirPoll.setPriorities (priorities);
        dirPoll.setLogger (getLog().getLogger(), getLog().getRealm ());
        Configuration cfg = factory.getConfiguration (getPersist());
View Full Code Here

Examples of org.openmim.infrastructure.taskmanager.ThreadPool

  private SocketRegistry sr;

  public Dispatcher(SocketRegistry sr, int maxThreads, int optimumThreads)
  {
    super("simpletcp dispatcher thread #"+(count++));
    threadPool = new ThreadPool(maxThreads, optimumThreads);
    this.sr = sr;
  }
View Full Code Here

Examples of org.parosproxy.paros.common.ThreadPool

        super();
        this.hostAndPort = hostAndPort;
        this.parentScanner = parentScanner;
        this.scannerParam = scannerParam;
        httpSender = new HttpSender(connectionParam, true);
        threadPool = new ThreadPool(scannerParam.getThreadPerHost());
    }
View Full Code Here

Examples of org.quartz.spi.ThreadPool

                }
                catch (NumberFormatException e) {
                    getLog().error("Unable to parse " + SYSPROPERTY_QUARTZ_THREADPRIORITY + " as integer. Using default of " + threadPriority);
                }
            }
            ThreadPool threadPool = new SimpleThreadPool(threadCount, threadPriority);
            threadPool.initialize();
            JobStore jobStore = new RAMJobStore();
            DirectSchedulerFactory.getInstance().createScheduler(threadPool, jobStore);
            _quartzScheduler = DirectSchedulerFactory.getInstance().getScheduler();
            _quartzScheduler.start();
        }
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.