Examples of DefaultThreadFactory


Examples of com.zaxxer.hikari.util.DefaultThreadFactory

      this.addConnectionExecutor = createThreadPoolExecutor(configuration.getMaximumPoolSize(), "HikariCP connection filler (pool " + configuration.getPoolName() + ")", configuration.getThreadFactory(), new ThreadPoolExecutor.DiscardPolicy());
      this.closeConnectionExecutor = createThreadPoolExecutor(4, "HikariCP connection closer (pool " + configuration.getPoolName() + ")", configuration.getThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy());

      long delayPeriod = Long.getLong("com.zaxxer.hikari.housekeeping.periodMs", TimeUnit.SECONDS.toMillis(30L));
      this.houseKeepingExecutorService = new ScheduledThreadPoolExecutor(1, configuration.getThreadFactory() != null ? configuration.getThreadFactory() : new DefaultThreadFactory("Hikari Housekeeping Timer (pool " + configuration.getPoolName() + ")", true));
      if (IS_JAVA7) {
         this.houseKeepingExecutorService.setRemoveOnCancelPolicy(true);
      }
      this.houseKeepingExecutorService.scheduleAtFixedRate(new HouseKeeper(), delayPeriod, delayPeriod, TimeUnit.MILLISECONDS);
View Full Code Here

Examples of com.zaxxer.hikari.util.DefaultThreadFactory

      this.addConnectionExecutor = createThreadPoolExecutor(configuration.getMaximumPoolSize(), "HikariCP connection filler (pool " + configuration.getPoolName() + ")", configuration.getThreadFactory(), new ThreadPoolExecutor.DiscardPolicy());
      this.closeConnectionExecutor = createThreadPoolExecutor(4, "HikariCP connection closer (pool " + configuration.getPoolName() + ")", configuration.getThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy());

      long delayPeriod = Long.getLong("com.zaxxer.hikari.housekeeping.periodMs", TimeUnit.SECONDS.toMillis(30L));
      this.houseKeepingExecutorService = new ScheduledThreadPoolExecutor(1, configuration.getThreadFactory() != null ? configuration.getThreadFactory() : new DefaultThreadFactory("Hikari Housekeeping Timer (pool " + configuration.getPoolName() + ")", true));
      this.houseKeepingExecutorService.setRemoveOnCancelPolicy(true);
      this.houseKeepingExecutorService.scheduleAtFixedRate(new HouseKeeper(), delayPeriod, delayPeriod, TimeUnit.MILLISECONDS);

      setLoginTimeout(dataSource, connectionTimeout, LOGGER);
      registerMBeans(configuration, this);
View Full Code Here

Examples of io.netty.util.concurrent.DefaultThreadFactory

        LOGGER.info(environment.toString());
        LOGGER.debug(Diagnostics.collectAndFormat());

        this.environment = environment;
        configProvider = new DefaultConfigurationProvider(this, environment);
        disruptorExecutor = Executors.newFixedThreadPool(2, new DefaultThreadFactory("cb-core", true));

        responseDisruptor = new Disruptor<ResponseEvent>(
            new ResponseEventFactory(),
            environment.responseBufferSize(),
            disruptorExecutor
View Full Code Here

Examples of io.netty.util.concurrent.DefaultThreadFactory

        queryServiceEndpoints = intPropertyOr("queryEndpoints", builder.queryEndpoints());
        packageNameAndVersion = stringPropertyOr("packageNameAndVersion", builder.packageNameAndVersion());
        userAgent = stringPropertyOr("userAgent", builder.userAgent());

        this.ioPool = builder.ioPool() == null
            ? new NioEventLoopGroup(ioPoolSize(), new DefaultThreadFactory("cb-io", true)) : builder.ioPool();
        this.coreScheduler = builder.scheduler() == null ? new CoreScheduler(computationPoolSize()) : builder.scheduler();
        this.shutdown = false;
    }
View Full Code Here

Examples of io.netty.util.concurrent.DefaultThreadFactory

        super(nThreads == 0? DEFAULT_EVENT_LOOP_THREADS : nThreads, threadFactory, args);
    }

    @Override
    protected ThreadFactory newDefaultThreadFactory() {
        return new DefaultThreadFactory(getClass(), Thread.MAX_PRIORITY);
    }
View Full Code Here

Examples of org.apache.axis2.util.threadpool.DefaultThreadFactory

        // create thread pool of workers
        workerPool = new ThreadPoolExecutor(
            1,
            WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
            new LinkedBlockingQueue(),
            new DefaultThreadFactory(
                    new ThreadGroup("HTTP Worker thread group"),
                    "HTTPWorker"));
    }
View Full Code Here

Examples of org.apache.axis2.util.threadpool.DefaultThreadFactory

     */
    public void start() throws AxisFault {
        workerPool = new ThreadPoolExecutor(1,
                                            WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
                                            new LinkedBlockingQueue(),
                                            new DefaultThreadFactory(
                                                    new ThreadGroup("Mail Worker thread group"),
                                                    "MailWorker"));

        messageQueue = new LinkedBlockingQueue();

View Full Code Here

Examples of org.apache.axis2.util.threadpool.DefaultThreadFactory

     */
    public void start() throws AxisFault {
        workerPool = new ThreadPoolExecutor(1,
                                            WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
                                            new LinkedBlockingQueue(),
                                            new DefaultThreadFactory(
                                                    new ThreadGroup("Mail Worker thread group"),
                                                    "MailWorker"));

        messageQueue = new LinkedBlockingQueue();

View Full Code Here

Examples of org.infinispan.factories.threads.DefaultThreadFactory

      }
   }

   private ThreadFactory createThreadFactoryWithDefaults(GlobalConfiguration globalCfg, final String componentName) {
      // Use defaults
      return new DefaultThreadFactory(null,
            KnownComponentNames.getDefaultThreadPrio(componentName), DefaultThreadFactory.DEFAULT_PATTERN,
            globalCfg.transport().nodeName(), shortened(componentName));
   }
View Full Code Here

Examples of org.infinispan.factories.threads.DefaultThreadFactory

               throw ParseUtils.unexpectedAttribute(reader, i);
            }
         }
      }

      DefaultThreadFactory threadFactory = new DefaultThreadFactory(
            threadGroup, priority, threadNamePattern, null, null);
      threadFactories.put(name, threadFactory);
      ParseUtils.requireNoContent(reader);
   }
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.