Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.ThreadFactory


    * @param threadGroup threadGroup
    */
   public BasicThreadPool(String name, ThreadGroup threadGroup)
   {
      trace = log.isTraceEnabled();
      ThreadFactory factory = new ThreadPoolThreadFactory();

      queue = new BoundedLinkedQueue(1024);

      executor = new MinPooledExecutor(queue, 100);
      executor.setMinimumPoolSize(4);
View Full Code Here


        PooledExecutor p = new PooledExecutor();
        p.setKeepAliveTime(1000 * 30);
        p.setMinimumPoolSize(5);
        p.setMaximumPoolSize(Integer.MAX_VALUE);
        p.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable arg0) {
                return new Thread(arg0, "Remoting 'async' protocol worker " + getNextWorkerID());
            }
        });

View Full Code Here

     */
    public ClockDaemon getClockDaemon() {
        if (clockDaemon != null)
            return clockDaemon;
        clockDaemon = new ClockDaemon();
        clockDaemon.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread t = new Thread(r, "Remoting 'async' protocol monitor");
                t.setDaemon(true);
                return t;
            }
View Full Code Here

            throw new IllegalArgumentException("Name is required.");
        }
        executor = new PooledExecutor();
        name = aName;
        executor.setThreadFactory(
            new ThreadFactory() {
                public Thread newThread(Runnable arg0) {
                    Thread thread = new Thread(arg0, name);
                    thread.setDaemon(true);
                    return thread;
                }
View Full Code Here

   {
      PooledExecutor threadPool = new PooledExecutor(max_pool);
      threadPool.waitWhenBlocked();
      threadPool.setMinimumPoolSize(1);
      threadPool.setKeepAliveTime(pool_thread_keep_alive);
      threadPool.setThreadFactory(new ThreadFactory()
      {

         public Thread newThread(final Runnable command)
         {
            synchronized (poolLock)
View Full Code Here

    this.fileManagerId = fileManagerId;
    this.sequenceGenerator = sequenceGenerator;
      this.file = logFile;   
      this.byteBufferPool = new ByteBufferPool();
    this.executor = new QueuedExecutor()
    this.executor.setThreadFactory(new ThreadFactory(){
      public Thread newThread(Runnable runnable) {
        Thread answer = new Thread(runnable, "Journal Writter");
        answer.setPriority(Thread.MAX_PRIORITY);
        answer.setDaemon(true);
        return answer;
View Full Code Here

        return new JournalPersistenceAdapter(directory, JdbmPersistenceAdapter.newInstance(directory), new DefaultWireFormat());
    }

    public JournalPersistenceAdapter() {
        checkpointExecutor = new QueuedExecutor(new LinkedQueue());
        checkpointExecutor.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable runnable) {
                Thread answer = new Thread(runnable, "Checkpoint Worker");
                answer.setDaemon(true);
                answer.setPriority(Thread.MAX_PRIORITY);
                return answer;
View Full Code Here

    }

    public ClockDaemon getClockDaemon() {
        if (clockDaemon == null) {
            clockDaemon = new ClockDaemon();
            clockDaemon.setThreadFactory(new ThreadFactory() {
                public Thread newThread(Runnable runnable) {
                    Thread thread = new Thread(runnable, "Checkpoint Timmer");
                    thread.setDaemon(true);
                    return thread;
                }
View Full Code Here

        return clockDaemon;
    }

    public void doStart() throws Exception {
        clockDaemon = new ClockDaemon();
        clockDaemon.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread t = new Thread(r, poolName + " ");
                t.setDaemon(true);
                return t;
            }
View Full Code Here

    }

    public ClockDaemon getClockDaemon() {
        if (clockDaemon == null) {
            clockDaemon = new ClockDaemon();
            clockDaemon.setThreadFactory(new ThreadFactory() {
                public Thread newThread(Runnable runnable) {
                    Thread thread = new Thread(runnable, "Cleanup Timmer");
                    thread.setDaemon(true);
                    return thread;
                }
View Full Code Here

TOP

Related Classes of EDU.oswego.cs.dl.util.concurrent.ThreadFactory

Copyright © 2018 www.massapicom. 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.