@Created protected void initMarkerIfNeeded() { if (marker == null) { marker = Localhosts.get(); } LOGGER.warning("This storage used on app side can be a bit slow, maybe consider using a remote collector"); }
@Created protected void initMarkerIfNeeded() { if (marker == null) { marker = Localhosts.get(); } LOGGER.warning("This storage used on app side can be a bit slow, maybe consider using a remote collector"); }
@Created public void createInstance() { cubeInstance = this.build(); }
@Created protected void initMarkerIfNotAlreadyDone() { if (marker == null) { marker = Localhosts.get(); } LOGGER.warning("This storage used on app side can be a bit slow, maybe consider using a remote collector"); }
@Created public void createInstance() { cubeInstance = this.build(); }
@Created public void createInstance() { cubeInstance = this.build(); }
@Created public void run() { reload(); }
@Created // call it only when main impl not in delegated mode so use IoC lifecycle management public void initBatch() { final String name = 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 ); }
@Created // call it only when main impl not in delegated mode so use IoC lifecycle management public void initBatch() { 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); }
@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); }
@Created public void initialize() { ExecutorService exec = Executors.newCachedThreadPool(); // FIXME make configurable: WaitStrategy disruptor = new Disruptor<PathTrackingEntry>( new EventFactory<PathTrackingEntry>() { @Override public PathTrackingEntry newInstance() { return new PathTrackingEntry(); } }, ringBufferSize, exec, ProducerType.SINGLE, new BusySpinWaitStrategy() ); for ( int i = 0; i < numberOfConsumers; i++ ) { disruptor.handleEventsWith( new PathTrackingEntryEventHandler( i, numberOfConsumers ) ); } ringBuffer = disruptor.start(); }