public static boolean isCollector() { IoCs.findOrCreateInstance(Repository.class); // ensure we have a repo which init store classes by default return IoCs.getInstance(CollectorCounterStore.class) != null; } }
@Override public void contextDestroyed(final ServletContextEvent sce) { IoCs.shutdown(); } }
public DelegatedCollectorPathTrackingDataStore() { this.delegatedPathTrackingDataStore = IoCs.findOrCreateInstance( PathTrackingDataStore.class ); }
@Created public void createInstance() { cubeInstance = this.build(); }
@Destroying public void destroy() { executorService.shutdownNow(); }
public static <T> T autoSet(final T instance) throws Exception { return autoSet(null, instance); }
public static <T> T processInstance(final T instance) { try { return internalProcessInstance(instance); } catch (final Exception e) { throw new SironaException(e); } }
protected static NodeStatusDataStore findStatusDataStore() { NodeStatusDataStore status = null; try { status = IoCs.findOrCreateInstance(NodeStatusDataStore.class); } catch (final SironaException e) { // no-op } if (status == null) { status = IoCs.findOrCreateInstance(DataStoreFactory.class).getNodeStatusDataStore(); } return status; }
@Created public void createInstance() { cubeInstance = this.build(); }
@Destroying public void shutdown() { HFactory.shutdownCluster(cluster); }
@Override public void run() { shutdown(); } };
public CassandraPathTrackingDataStore() { this.cassandra = IoCs.findOrCreateInstance( CassandraSirona.class ); this.keyspace = cassandra.getKeyspace(); this.family = cassandra.getPathTrackingColumFamily(); this.markerFamilly = cassandra.getMarkerPathTrackingColumFamily(); }
@Created public void createInstance() { cubeInstance = this.build(); }
@Destroying public void destroy() { // FIXME timeout?? disruptor.shutdown(); }
public CassandraCollectorNodeStatusDataStore() { this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class); this.keyspace = cassandra.getKeyspace(); this.family = cassandra.getStatusColumnFamily(); this.markerFamily = cassandra.getMarkerStatusesColumnFamily(); }
@Created public void run() { reload(); }
@Destroying public void shutdown() { final BatchFuture task = scheduledTask.get(); if (task != null) { task.done(); scheduledTask.compareAndSet(task, null); } }
public CassandraCollectorGaugeDataStore() { this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class); this.keyspace = cassandra.getKeyspace(); this.valueFamily = cassandra.getGaugeValuesColumnFamily(); this.markerFamily = cassandra.getMarkerGaugesColumFamily(); }
@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"); }
public CassandraCollectorCounterDataStore() { this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class); this.keyspace = cassandra.getKeyspace(); this.markerFamily = cassandra.getMarkerCountersColumnFamily(); this.family = cassandra.getCounterColumnFamily(); }