Examples of DaemonThreadFactory


Examples of org.apache.sirona.util.DaemonThreadFactory

            getClass().getSimpleName().toLowerCase( Locale.ENGLISH ).replace( "pathtrackingdatastore", "" );

        final long period = getPeriod( name );

        final ScheduledExecutorService ses =
            Executors.newSingleThreadScheduledExecutor( new DaemonThreadFactory( name + "-pathtracking-schedule-" ) );

        final ScheduledFuture<?> future =
            ses.scheduleAtFixedRate( new PushPathTrackingTask(), period, period, TimeUnit.MILLISECONDS );

        scheduledTask = new BatchFuture( ses, future );
View Full Code Here

Examples of org.apache.sirona.util.DaemonThreadFactory

    @Created // call it only when main impl not in delegated mode so use IoC lifecycle management
    public void initAggregated() {
        final String name = getClass().getSimpleName().toLowerCase(Locale.ENGLISH).replace("gaugedatastore", "") + ".aggregated";
        final long period = getPeriod(name);

        final ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory(name + "-aggregated-gauge-schedule-"));
        final ScheduledFuture<?> future = ses.scheduleAtFixedRate(new PushGaugesTask(), period, period, TimeUnit.MILLISECONDS);
        scheduledAggregatedTask = new BatchFuture(ses, future);
    }
View Full Code Here

Examples of org.apache.sirona.util.DaemonThreadFactory

    private void reload() {
        final String name = getClass().getSimpleName().toLowerCase(Locale.ENGLISH).replace("nodestatusdatastore", "");
        final long period = getPeriod(name);

        final ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory(name + "-status-schedule-"));
        final ScheduledFuture<?> future = ses.scheduleAtFixedRate(new ReportStatusTask(nodeStatusReporter), period, period, TimeUnit.MILLISECONDS);
        scheduledTask.set(new BatchFuture(ses, future));
    }
View Full Code Here

Examples of org.apache.sirona.util.DaemonThreadFactory

                String delayStr = config.getInitParameter("rate");
                if (delayStr == null) {
                    delayStr = DEFAULT_DELAY;
                }
                final ScheduledExecutorService pool = Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory("boomerang-updater-" + abs(hashCode())));
                final long delay = Long.parseLong(delayStr);
                final ScheduledFuture<?> task = pool.scheduleWithFixedDelay(new CollectorUpdater(collectorCounterStore, counterStore), delay, delay, TimeUnit.MILLISECONDS);
                future = new BatchFuture(pool, task);
            }
        } catch (final SironaException se) {
View Full Code Here

Examples of org.apache.sirona.util.DaemonThreadFactory

        if (agents.add(node)) {
            if (collectionFuture == null) {
                synchronized (this) {
                    if (collectionFuture == null) {
                        final ScheduledExecutorService ses =
                            Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory("collector-pull-schedule"));
                        final ScheduledFuture<?> future = ses.scheduleAtFixedRate(new CollectTask(), //
                                                                                  collectionPeriod, //
                                                                                  collectionPeriod, //
                                                                                  TimeUnit.MILLISECONDS);
                        collectionFuture = new BatchFuture(ses, future);
View Full Code Here

Examples of org.asteriskjava.util.DaemonThreadFactory

        return new ThreadPoolExecutor(
                poolSize,
                (maximumPoolSize < poolSize) ? poolSize : maximumPoolSize,
                50000L, TimeUnit.MILLISECONDS,
                new SynchronousQueue<Runnable>(),
                new DaemonThreadFactory()
        );
    }
View Full Code Here

Examples of org.directwebremoting.impl.DaemonThreadFactory

   
    /**
     * Private constructor for Singleton pattern.
     */
    private ReverseAJAXManager() {
        final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1, new DaemonThreadFactory());
        executor.scheduleAtFixedRate(new ReverseAJAXThread(), 1, 100, TimeUnit.MILLISECONDS);
    }
View Full Code Here

Examples of org.jboss.weld.executor.DaemonThreadFactory

    private final ExecutorService executor;
    private final ObserverNotifier notifier;

    public ContainerLifecycleEventPreloader(int threadPoolSize, ObserverNotifier notifier) {
        this.executor = Executors.newFixedThreadPool(threadPoolSize, new DaemonThreadFactory(new ThreadGroup("weld-preloaders"), "weld-preloader-"));
        this.notifier = notifier;
    }
View Full Code Here

Examples of org.jruby.threading.DaemonThreadFactory

        cFiber.defineAnnotatedMethods(FiberMeta.class);

        if (runtime.getExecutor() != null) {
            executor = runtime.getExecutor();
        } else {
            executor = Executors.newCachedThreadPool(new DaemonThreadFactory());
        }
    }
View Full Code Here

Examples of org.jruby.threading.DaemonThreadFactory

                    RubyInstanceConfig.POOL_MIN,
                    RubyInstanceConfig.POOL_MAX,
                    RubyInstanceConfig.POOL_TTL,
                    TimeUnit.SECONDS,
                    new SynchronousQueue<Runnable>(),
                    new DaemonThreadFactory());
        }
       
        // initialize the root of the class hierarchy completely
        initRoot();
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.