Examples of BatchFuture


Examples of org.apache.sirona.store.BatchFuture

        final long period = getPeriod(prefix);
        clearAfterCollect = isClearAfterCollect(prefix);

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

Examples of org.apache.sirona.store.BatchFuture

        final String name = getClass().getSimpleName().toLowerCase(Locale.ENGLISH).replace("gaugedatastore", "");
        final long period = getPeriod(name);

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

Examples of org.apache.sirona.store.BatchFuture

            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.store.BatchFuture

        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.store.BatchFuture

        return new NodeStatusReporter();
    }

    @Destroying
    public void shutdown() {
        final BatchFuture task = scheduledTask.get();
        if (task != null) {
            task.done();
            scheduledTask.set(null);
        }
        status.set(null);
    }
View Full Code Here

Examples of org.apache.sirona.store.BatchFuture

        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.store.BatchFuture

                    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) {
            counterStore = IoCs.getInstance(CounterDataStore.class);
        }
    }
View Full Code Here

Examples of org.apache.sirona.store.BatchFuture

                            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.apache.sirona.store.BatchFuture

            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
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.