Package com.opengamma.util

Examples of com.opengamma.util.NamedThreadPoolFactory


  private static ScheduledExecutorService createTimeoutExecutor() {
    final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
    executor.setKeepAliveTime(60, TimeUnit.SECONDS);
    executor.allowCoreThreadTimeOut(true);
    executor.setThreadFactory(new NamedThreadPoolFactory("AsynchronousOperation-Timeout"));
    return executor;
  }
View Full Code Here


      _connection = _jmsConnector.getConnectionFactory().createConnection();
      _connection.start();
    } catch (JMSException e) {
      throw new OpenGammaRuntimeException("Failed to create JMS connection", e);
    }
    _executor = Executors.newCachedThreadPool(new NamedThreadPoolFactory(toString(), true));
    _running.set(true);
  }
View Full Code Here

  private final ExecutorService _executor;
  private final boolean _localExecutor;
 
  public InMemoryQueueByteArrayRequestConduit(int nWorkerThreads, ByteArrayRequestReceiver underlying) {
    _underlying = underlying;
    ThreadFactory tf = new NamedThreadPoolFactory("InMemoryQueueByteArrayRequestConduit", true);
    ThreadPoolExecutor executor = new ThreadPoolExecutor(
        0, nWorkerThreads, 5L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), tf);
    _executor = executor;
    _localExecutor = true;
  }
View Full Code Here

    _portfolioMaster = portfolioMaster;
    _positionSource = positionSource;
    _securitySource = securitySource;
    final int threads = 32;
    final ThreadPoolExecutor executor = new ThreadPoolExecutor(threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
    executor.setThreadFactory(new NamedThreadPoolFactory("doc"));
    executor.allowCoreThreadTimeOut(true);
    _executorService = executor;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.util.NamedThreadPoolFactory

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.