@Override protected final ScheduledExecutorService executor() { executor = Executors.newSingleThreadScheduledExecutor( Threads.createDaemonThreadFactory("LevelDBDatasetMetricsReporter-scheduler")); return executor; }
@Override protected final ScheduledExecutorService executor() { executor = Executors.newSingleThreadScheduledExecutor(Threads.createDaemonThreadFactory("reporter-scheduler")); return executor; }
@Override protected ScheduledExecutorService executor() { return Executors.newSingleThreadScheduledExecutor( Threads.createDaemonThreadFactory("concurrent-stream-writer")); }
@Override protected final ScheduledExecutorService executor() { executor = Executors.newSingleThreadScheduledExecutor(Threads.createDaemonThreadFactory("reporter-scheduler")); return executor; }
public InMemoryElectionRegistry() { // It has to be a linked hash multimap as the order of addition determine who is the leader. this.registry = LinkedHashMultimap.create(); // Creates a single thread executor using daemon threads. No need to worry about shutdown. this.executor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("memory-leader-election")); }
@Override protected void startUp() throws Exception { scheduler = Executors.newSingleThreadScheduledExecutor(Threads.createDaemonThreadFactory("credentials-updater")); scheduler.submit(this).get(); LOG.debug("Credentials updater started"); }
protected AbstractPropertyStore() { this.listeners = LinkedHashMultimap.create(); this.propertyCache = Maps.newHashMap(); this.listenerExecutor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("property-store-%d")); this.closed = new AtomicBoolean(); }
protected AbstractPropertyStore() { this.listeners = LinkedHashMultimap.create(); this.propertyCache = Maps.newHashMap(); this.listenerExecutor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("property-store-%d")); this.closed = new AtomicBoolean(); }
private ExecutorService createEvictionExecutor() { return new ThreadPoolExecutor(0, MAX_EVICTION_THREAD_POOL_SIZE, EVICTION_THREAD_POOL_KEEP_ALIVE_SECONDS, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), Threads.createDaemonThreadFactory("queue-eviction-%d"), new ThreadPoolExecutor.CallerRunsPolicy()); } }
@Override protected void doStart() { handlerExecutor = Executors.newSingleThreadExecutor( Threads.createDaemonThreadFactory("resource-coordinator-client")); notifyStarted(); }
@Override protected void doStart() { handlerExecutor = Executors.newSingleThreadExecutor( Threads.createDaemonThreadFactory("resource-coordinator-client")); notifyStarted(); }
@Override protected void startUp() throws Exception { LOG.info("Starting {}", getClass().getSimpleName()); // Use a shared executor for all different subscribers and only keep one core thread subscriberExecutor = Executors.newScheduledThreadPool( 1, Threads.createDaemonThreadFactory("scheduler-notification-subscriber-%d")); // Start all subscriber services. All of them has no-op in start, so they shouldn't fail. Futures.successfulAsList(subscriberServices.stream().map(Service::start).collect(Collectors.toList())).get(); }
@Override protected ScheduledExecutorService executor() { executor = Executors.newSingleThreadScheduledExecutor(Threads.createDaemonThreadFactory(getServiceName())); return executor; }
@Override protected ScheduledExecutorService executor() { executor = Executors.newSingleThreadScheduledExecutor(Threads.createDaemonThreadFactory(getServiceName())); return executor; }
@Override protected void startUp() throws Exception { runThread = Thread.currentThread(); processExecutor = Executors.newSingleThreadExecutor( Threads.createDaemonThreadFactory(getServiceName() + "-executor")); }
@Override protected void startUp() throws Exception { LOG.info("Starting {}", getClass().getSimpleName()); // Use a shared executor for all different subscribers and only keep one core thread subscriberExecutor = Executors.newScheduledThreadPool( 1, Threads.createDaemonThreadFactory("scheduler-notification-subscriber-%d")); // Start all subscriber services. All of them has no-op in start, so they shouldn't fail. Futures.successfulAsList(subscriberServices.stream().map(Service::start).collect(Collectors.toList())).get(); }
@Override protected void startUp() throws Exception { LOG.info("Starting {}", getClass().getSimpleName()); initializeProvisioners(); ExecutorService executorService = Executors.newCachedThreadPool( Threads.createDaemonThreadFactory("provisioning-service-%d")); this.taskExecutor = new KeyedExecutor<>(executorService); resumeTasks(taskStateCleanup); }
void init() throws SchedulerException { try { taskExecutorService = MoreExecutors.listeningDecorator( Executors.newCachedThreadPool(Threads.createDaemonThreadFactory("time-schedule-task"))); scheduler = schedulerSupplier.get(); scheduler.setJobFactory(createJobFactory()); } catch (org.quartz.SchedulerException e) { throw new SchedulerException(e); } }
void init() throws SchedulerException { try { taskExecutorService = MoreExecutors.listeningDecorator( Executors.newCachedThreadPool(Threads.createDaemonThreadFactory("time-schedule-task"))); scheduler = schedulerSupplier.get(); scheduler.setJobFactory(createJobFactory()); } catch (org.quartz.SchedulerException e) { throw new SchedulerException(e); } }
@Override protected void doStart() { executor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("resource-coordinator")); beginWatch(wrapWatcher(new ResourceWatcher())); notifyStarted(); }