Examples of ExecutorFactory


Examples of org.hornetq.utils.ExecutorFactory

      config.setJournalDirectory(journalDir);
      config.setPagingDirectory(pagingDir);
      config.setLargeMessagesDirectory(largeMessagesDir);
      config.setJournalType(JournalType.NIO);
      final ExecutorService executor = Executors.newFixedThreadPool(1);
      ExecutorFactory executorFactory = new ExecutorFactory()
      {
         public Executor getExecutor()
         {
            return executor;
         }
View Full Code Here

Examples of org.hornetq.utils.ExecutorFactory

   {
      try
      {
         ScheduledExecutorService scheduled = Executors.newScheduledThreadPool(1);
         final ExecutorService executor = Executors.newFixedThreadPool(10);
         ExecutorFactory executorFactory = new ExecutorFactory()
         {
            public Executor getExecutor()
            {
               return executor;
            }
View Full Code Here

Examples of org.hornetq.utils.ExecutorFactory

      return new FakePostOffice();
   }

   private ExecutorFactory getExecutorFactory()
   {
      return new ExecutorFactory()
      {

         public Executor getExecutor()
         {
            return executor;
View Full Code Here

Examples of org.hornetq.utils.ExecutorFactory

      return new FakePostOffice();
   }

   private ExecutorFactory getExecutorFactory()
   {
      return new ExecutorFactory()
      {

         public Executor getExecutor()
         {
            return executor;
View Full Code Here

Examples of org.infinispan.commons.executors.ExecutorFactory

            marshaller = Util.getInstance(configuration.marshallerClass());
         }
      }

      if (asyncExecutorService == null) {
         ExecutorFactory executorFactory = configuration.asyncExecutorFactory().factory();
         if (executorFactory == null) {
            executorFactory = Util.getInstance(configuration.asyncExecutorFactory().factoryClass());
         }
         asyncExecutorService = executorFactory.getExecutor(configuration.asyncExecutorFactory().properties());
      }

      synchronized (cacheName2RemoteCache) {
         for (RemoteCacheHolder rcc : cacheName2RemoteCache.values()) {
            startRemoteCache(rcc);
View Full Code Here

Examples of org.infinispan.commons.executors.ExecutorFactory

            marshaller = Util.getInstance(configuration.marshallerClass());
         }
      }

      if (asyncExecutorService == null) {
         ExecutorFactory executorFactory = configuration.asyncExecutorFactory().factory();
         if (executorFactory == null) {
            executorFactory = Util.getInstance(configuration.asyncExecutorFactory().factoryClass());
         }
         asyncExecutorService = executorFactory.getExecutor(configuration.asyncExecutorFactory().properties());
      }

      listenerNotifier = new ClientListenerNotifier(asyncExecutorService, codec, marshaller);
      transportFactory.start(codec, configuration, defaultCacheTopologyId, listenerNotifier);
View Full Code Here

Examples of org.infinispan.commons.executors.ExecutorFactory

            marshaller = Util.getInstance(configuration.marshallerClass());
         }
      }

      if (asyncExecutorService == null) {
         ExecutorFactory executorFactory = configuration.asyncExecutorFactory().factory();
         if (executorFactory == null) {
            executorFactory = Util.getInstance(configuration.asyncExecutorFactory().factoryClass());
         }
         asyncExecutorService = executorFactory.getExecutor(configuration.asyncExecutorFactory().properties());
      }

      synchronized (cacheName2RemoteCache) {
         for (RemoteCacheHolder rcc : cacheName2RemoteCache.values()) {
            startRemoteCache(rcc);
View Full Code Here

Examples of org.infinispan.executors.ExecutorFactory

         setMarshaller((Marshaller) getInstance(marshallerName, classLoader));
      }

      if (asyncExecutorService == null) {
         String asyncExecutorClass = config.getAsyncExecutorFactory();
         ExecutorFactory executorFactory = (ExecutorFactory) getInstance(asyncExecutorClass, classLoader);
         asyncExecutorService = executorFactory.getExecutor(config.getProperties());
      }

      synchronized (cacheName2RemoteCache) {
         for (RemoteCacheHolder rcc : cacheName2RemoteCache.values()) {
            startRemoteCache(rcc);
View Full Code Here

Examples of org.infinispan.executors.ExecutorFactory

      String asyncExecutorClass = DefaultAsyncExecutorFactory.class.getName();
      if (props.contains("asyn-executor-factory")) {
         asyncExecutorClass = props.getProperty("asyn-executor-factory");
      }
      ExecutorFactory executorFactory = (ExecutorFactory) VHelper.newInstance(asyncExecutorClass);
      asyncExecutorService = executorFactory.getExecutor(props);


      if (props.get("force-return-value") != null && props.get("force-return-value").equals("true")) {
         forceReturnValueDefault = true;
      }
View Full Code Here

Examples of org.infinispan.executors.ExecutorFactory

   }

   private ExecutorService buildAndConfigureExecutorService(String factoryName, Properties p, String componentName) throws Exception {
      Properties props = new Properties(p); // defensive copy
      if (p != null && !p.isEmpty()) props.putAll(p);
      ExecutorFactory f = (ExecutorFactory) Util.getInstance(factoryName);
      setComponentName(componentName, props);
      setDefaultThreads(KnownComponentNames.getDefaultThreads(componentName), props);
      setDefaultThreadPrio(KnownComponentNames.getDefaultThreadPrio(componentName), props);
      return f.getExecutor(props);
   }
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.