@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 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 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 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("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); }