Examples of PoolExecutor


Examples of com.opengamma.util.PoolExecutor

        return Collections.singletonMap(identifier, uid);
      } else {
        return Collections.emptyMap();
      }
    }
    final PoolExecutor executor = PoolExecutor.instance();
    if (executor != null) {
      return resolveExternalIdsMultiThread(executor, resolver, identifiers, versionCorrection);
    } else {
      return resolveExternalIdsSingleThread(resolver, identifiers, versionCorrection);
    }
View Full Code Here

Examples of com.opengamma.util.PoolExecutor

        return Collections.singletonMap(identifier, uid);
      } else {
        return Collections.emptyMap();
      }
    }
    final PoolExecutor executor = PoolExecutor.instance();
    if (executor != null) {
      return resolveObjectIdsMultiThread(executor, resolver, identifiers, versionCorrection);
    } else {
      return resolveObjectIdsSingleThread(resolver, identifiers, versionCorrection);
    }
View Full Code Here

Examples of com.opengamma.util.PoolExecutor

  @Override
  public AtVersionCorrection atVersionCorrection(final VersionCorrection versionCorrection) {
    return new AtVersionCorrection() {

      private PoolExecutor.Service<Void> createService() {
        final PoolExecutor executor = PoolExecutor.instance();
        if (executor != null) {
          return executor.createService(null);
        } else {
          return null;
        }
      }
View Full Code Here

Examples of com.opengamma.util.PoolExecutor

    ArgumentChecker.notNull(functionRepositoryCompiler, "functionRepositoryCompiler");
    ArgumentChecker.notNull(functionCompilationContext, "functionCompilationContext");
    _rawFunctionRepository = functionRepository;
    _functionRepositoryCompiler = functionRepositoryCompiler;
    _functionCompilationContext = functionCompilationContext;
    _executorService = new PoolExecutor(Math.max(Runtime.getRuntime().availableProcessors(), 1), "CFS");
  }
View Full Code Here

Examples of com.opengamma.util.PoolExecutor

        return null;
      } else {
        s_logger.debug("Checking {} of {} resolutions for changed objects", toCheck.size(), previousResolutions.size());
      }
    }
    PoolExecutor previousInstance = PoolExecutor.setInstance(getProcessContext().getFunctionCompilationService().getExecutorService());
    final Map<ComputationTargetReference, ComputationTargetSpecification> specifications = getProcessContext().getFunctionCompilationService().getFunctionCompilationContext()
        .getRawComputationTargetResolver().getSpecificationResolver().getTargetSpecifications(toCheck, versionCorrection);
    PoolExecutor.setInstance(previousInstance);
    t += System.nanoTime();
    Map<UniqueId, ComputationTargetSpecification> invalidIdentifiers = null;
View Full Code Here

Examples of org.simpleframework.util.thread.PoolExecutor

    * @param allocator this is used to allocate any buffers needed
    * @param count this is the number of threads per thread pool
    * @param select this is the number of selector threads to use
    */
   public ContainerSelector(Container handler, Allocator allocator, int count, int select) throws IOException {
      this.executor = new PoolExecutor(Dispatcher.class, count);
      this.collect = new PoolExecutor(Reader.class, count);
      this.reactor = new ExecutorReactor(collect, select);    
      this.allocator = allocator;
      this.handler = handler;
   }
View Full Code Here

Examples of org.simpleframework.util.thread.PoolExecutor

    *
    * @param processor this is used to process the transports
    * @param count this is the number of threads used by this
    */
   public SecureNegotiator(Processor processor, int count) throws IOException {         
     this.executor = new PoolExecutor(Notifier.class, count);         
     this.reactor = new ExecutorReactor(executor);           
     this.processor = processor;                 
  
View Full Code Here

Examples of org.simpleframework.util.thread.PoolExecutor

      }
      dumper.kill();
   }
 
   public static Client createClient(InetSocketAddress address, String tag) throws Exception {
      PoolExecutor executor = new PoolExecutor(Runnable.class, 20);
      int port = address.getPort();
      Client client = new Client(executor, port, tag);

      client.start();
      return client;
View Full Code Here

Examples of org.simpleframework.util.thread.PoolExecutor

      private final ThreadDumper dumper;
      private final List<String> list;
      private final List<java.net.Socket> sockets;
     
      public Pinger(int port, boolean socket, int count) throws Exception {
         this.executor = new PoolExecutor(Pinger.class, count);
         this.list = new Vector<String>(count);
         this.sockets = new Vector<java.net.Socket>(count);
         this.latch = new CountDownLatch(count);
         this.stop = new CountDownLatch(count + count);
         this.dumper = new ThreadDumper();
View Full Code Here

Examples of org.simpleframework.util.thread.PoolExecutor

    * @param allocator this is used to allocate any buffers needed
    * @param count this is the number of threads per thread pool
    * @param select this is the number of selector threads to use
    */
   public ContainerSelector(Container handler, Allocator allocator, int count, int select) throws IOException {
      this.collect = new PoolExecutor(Reader.class, count);
      this.reactor = new ExecutorReactor(collect, select);
      this.executor = new PoolExecutor(Dispatcher.class, count);     
      this.tracker = new CookieTracker();
      this.allocator = allocator;
      this.handler = handler;
   }
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.