Examples of NamedThreadFactory


Examples of org.jboss.dna.common.util.NamedThreadFactory

                    workspaces.add(space);
                }
            }

            // Create the ExecutorService ...
            ExecutorService executor = Executors.newCachedThreadPool(new NamedThreadFactory(name));

            return new FederatedRepository(name, connectionFactory, workspaces, defaultCachePolicy, executor);
        } catch (RepositorySourceException t) {
            throw t; // rethrow
        } catch (Throwable t) {
View Full Code Here

Examples of org.jboss.dna.common.util.NamedThreadFactory

                if (existingWorkspaceName.equals(workspaceName)) continue;
                workspaces.add(this.configuration.getWorkspace(existingWorkspaceName));
            }
        } else {
            connectionFactory = context.getRepositoryConnectionFactory();
            executor = Executors.newCachedThreadPool(new NamedThreadFactory(name));
        }

        // Add the new workspace ...
        FederatedWorkspace newWorkspace = new FederatedWorkspace(context, name, workspaceName, projections, defaultCachePolicy);
        if (isDefault) {
View Full Code Here

Examples of org.jmxtrans.embedded.util.concurrent.NamedThreadFactory

        }
        for (OutputWriter outputWriter : outputWriters) {
            outputWriter.start();
        }

        collectScheduledExecutor = Executors.newScheduledThreadPool(getNumQueryThreads(), new NamedThreadFactory("jmxtrans-collect-", true));
        exportScheduledExecutor = Executors.newScheduledThreadPool(getNumExportThreads(), new NamedThreadFactory("jmxtrans-export-", true));

        for (final Query query : getQueries()) {
            collectScheduledExecutor.scheduleWithFixedDelay(new Runnable() {
                @Override
                public void run() {
View Full Code Here

Examples of org.jscsi.core.utils.NamedThreadFactory

   /////////////////////////////////////////////////////////////////////////////
   // constructor(s)

   public DefaultTaskManager(int numThreads, TaskSet taskSet)
   {
      executor = Executors.newFixedThreadPool(numThreads, new NamedThreadFactory("TaskExecutor"));
      this.taskSet = taskSet;
   }
View Full Code Here

Examples of org.menacheri.jetserver.concurrent.NamedThreadFactory

  public Bootstrap createServerBootstrap()
  {
    // TODO The thread pools should be injected from spring.
    serverBootstrap = new ServerBootstrap(
        new NioServerSocketChannelFactory(Executors
            .newCachedThreadPool(new NamedThreadFactory(
                "TCP-Server-Boss")), Executors
            .newCachedThreadPool(new NamedThreadFactory(
                "TCP-Server-Worker"))));

    return serverBootstrap;
  }
View Full Code Here

Examples of org.menacheri.jetserver.concurrent.NamedThreadFactory

  @Override
  public Bootstrap createServerBootstrap()
  {
    serverBootstrap = new ConnectionlessBootstrap(
        new NioDatagramChannelFactory(Executors
            .newCachedThreadPool(new NamedThreadFactory(
                "UDP-Server-Worker"))));
    return serverBootstrap;
  }
View Full Code Here

Examples of org.menacheri.jetserver.concurrent.NamedThreadFactory

  {
    // TODO The thread pools should be injected from spring.
    serverBootstrap = new ServerBootstrap(
       
        new NioServerSocketChannelFactory(Executors
            .newFixedThreadPool(1,new NamedThreadFactory(
                "Flash-Server-Boss")), Executors
            .newFixedThreadPool(1,new NamedThreadFactory(
                "Flash-Server-Worker"))));

    return serverBootstrap;
  }
View Full Code Here

Examples of org.modeshape.common.util.NamedThreadFactory

     *
     * @return a future representing the asynchronous session termination process.
     */
    Future<Boolean> shutdown() {
        // Create a simple executor that will do the backgrounding for us ...
        final ExecutorService executor = Executors.newSingleThreadExecutor(new NamedThreadFactory("modeshape-repository-stop"));
        try {
            // Submit a runnable to terminate all sessions ...
            Future<Boolean> future = executor.submit(new Callable<Boolean>() {
                @Override
                public Boolean call() throws Exception {
View Full Code Here

Examples of org.mule.util.concurrent.NamedThreadFactory

            // ..else create a "NamedThreadFactory" if a proper name was passed in
            if (StringUtils.isNotBlank(name))
            {
                // Use MuleContext classloader so that other temporary classloaders
                // aren't used when things are started lazily or from elsewhere.
                pool.setThreadFactory(new NamedThreadFactory(name, MuleContext.class.getClassLoader()));
            }
            else
            {
                // let ThreadPoolExecutor create a default ThreadFactory;
                // see Executors.defaultThreadFactory()
View Full Code Here

Examples of org.teiid.core.util.NamedThreadFactory

      this.csr = csr;
      if (port < 0 || port > 0xFFFF) {
            throw new IllegalArgumentException("port out of range:" + port); //$NON-NLS-1$
        }

      this.nettyPool = Executors.newCachedThreadPool(new NamedThreadFactory("NIO")); //$NON-NLS-1$
        if (LogManager.isMessageToBeRecorded(LogConstants.CTX_TRANSPORT, MessageLevel.DETAIL)) {
            LogManager.logDetail(LogConstants.CTX_TRANSPORT, "server = " + bindAddress + "binding to port:" + port); //$NON-NLS-1$ //$NON-NLS-2$
    }
       
        if (maxWorkers == 0) {
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.