Search in sources :

Example 6 with LoggingThreadGroup

use of org.apache.geode.internal.logging.LoggingThreadGroup in project geode by apache.

the class ParallelGatewaySenderQueue method initializeConflationThreadPool.

/**
   * Initialize the thread pool, setting the number of threads that is equal to the number of
   * processors available to the JVM.
   */
private void initializeConflationThreadPool() {
    final LoggingThreadGroup loggingThreadGroup = LoggingThreadGroup.createThreadGroup("WAN Queue Conflation Logger Group", logger);
    final ThreadFactory threadFactory = new ThreadFactory() {

        public Thread newThread(final Runnable task) {
            final Thread thread = new Thread(loggingThreadGroup, task, "WAN Queue Conflation Thread");
            thread.setDaemon(true);
            return thread;
        }
    };
    conflationExecutor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), threadFactory);
}
Also used : ThreadFactory(java.util.concurrent.ThreadFactory) LoggingThreadGroup(org.apache.geode.internal.logging.LoggingThreadGroup)

Aggregations

LoggingThreadGroup (org.apache.geode.internal.logging.LoggingThreadGroup)6 ThreadFactory (java.util.concurrent.ThreadFactory)4 ArrayList (java.util.ArrayList)2 ExecutionException (java.util.concurrent.ExecutionException)2 ExecutorService (java.util.concurrent.ExecutorService)2 Future (java.util.concurrent.Future)2 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)2 InternalGemFireException (org.apache.geode.InternalGemFireException)2 CancelException (org.apache.geode.CancelException)1 CacheClosedException (org.apache.geode.cache.CacheClosedException)1 CqClosedException (org.apache.geode.cache.query.CqClosedException)1 CqException (org.apache.geode.cache.query.CqException)1 CqResults (org.apache.geode.cache.query.CqResults)1 RegionNotFoundException (org.apache.geode.cache.query.RegionNotFoundException)1 QueryMonitor (org.apache.geode.cache.query.internal.QueryMonitor)1 ExtensionPoint (org.apache.geode.internal.cache.extension.ExtensionPoint)1 SimpleExtensionPoint (org.apache.geode.internal.cache.extension.SimpleExtensionPoint)1 GemFireSecurityException (org.apache.geode.security.GemFireSecurityException)1