public DelegatedCollectorPathTrackingDataStore() { this.delegatedPathTrackingDataStore = IoCs.findOrCreateInstance( PathTrackingDataStore.class ); }
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; }
protected static CommonGaugeDataStore findGaugeDataStore() { CommonGaugeDataStore gauge = null; try { gauge = IoCs.findOrCreateInstance(GaugeDataStore.class); } catch (final SironaException e) { // no-op } if (gauge == null) { try { gauge = IoCs.findOrCreateInstance(CollectorGaugeDataStore.class); } catch (final SironaException e) { // no-op } } if (gauge == null) { gauge = IoCs.findOrCreateInstance(DataStoreFactory.class).getGaugeDataStore(); } return gauge; }
protected static CounterDataStore findCounterDataStore() { CounterDataStore counter = null; try { counter = IoCs.findOrCreateInstance(CounterDataStore.class); } catch (final SironaException e) { // no-op } if (counter == null) { try { counter = IoCs.findOrCreateInstance(CollectorCounterStore.class); } catch (final SironaException e) { // no-op } } if (counter == null) { counter = IoCs.findOrCreateInstance(DataStoreFactory.class).getCounterDataStore(); } return counter; }
protected static PathTrackingDataStore findPathTrackingDataStore() { PathTrackingDataStore pathTrackingDataStore = null; try { pathTrackingDataStore = IoCs.findOrCreateInstance(PathTrackingDataStore.class); } catch (final SironaException e) { // no-op } /** FIXME define/implement CollectorPathTrackingDataStore if (pathTrackingDataStore == null) { try { pathTrackingDataStore = IoCs.findOrCreateInstance(CollectorPathTrackingDataStore.class); } catch (final SironaException e) { // no-op } } */ if (pathTrackingDataStore == null) { pathTrackingDataStore = IoCs.findOrCreateInstance(DataStoreFactory.class).getPathTrackingDataStore(); } return pathTrackingDataStore; }
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; } }
public static <T> T monitor(final Class<T> clazz, final Object instance) { return clazz.cast( IoCs.findOrCreateInstance(ProxyFactory.class) .createInvokerProxy(ClassLoaders.current(), new SironaPerformanceHandler(instance), new Class<?>[]{clazz})); }
public CassandraCollectorGaugeDataStore() { this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class); this.keyspace = cassandra.getKeyspace(); this.valueFamily = cassandra.getGaugeValuesColumnFamily(); this.markerFamily = cassandra.getMarkerGaugesColumFamily(); }
public CollectorDataStoreFactory() { super( IoCs.findOrCreateInstance( CounterDataStore.class ), // new DelegatedCollectorGaugeDataStore(), // new InMemoryCollectorNodeStatusDataStore(), // new DelegatedCollectorPathTrackingDataStore() ); } }
public CassandraCollectorCounterDataStore() { this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class); this.keyspace = cassandra.getKeyspace(); this.markerFamily = cassandra.getMarkerCountersColumnFamily(); this.family = cassandra.getCounterColumnFamily(); }
public CassandraPathTrackingDataStore() { this.cassandra = IoCs.findOrCreateInstance( CassandraSirona.class ); this.keyspace = cassandra.getKeyspace(); this.family = cassandra.getPathTrackingColumFamily(); this.markerFamilly = cassandra.getMarkerPathTrackingColumFamily(); }
public CassandraCollectorNodeStatusDataStore() { this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class); this.keyspace = cassandra.getKeyspace(); this.family = cassandra.getStatusColumnFamily(); this.markerFamily = cassandra.getMarkerStatusesColumnFamily(); }
final CollectorGaugeDataStore gaugeStore = IoCs.findOrCreateInstance(CollectorGaugeDataStore.class); final Iterator<String> markers = gaugeStore.markers().iterator(); final StringBuilder builder = new StringBuilder("[");
public CubeDisruptorDataStoreFactory() { super( IoCs.processInstance(new CubeCounterDataStore()), IoCs.processInstance(new CubeGaugeDataStore()), IoCs.processInstance(new CubeNodeStatusDataStore()), IoCs.findOrCreateInstance( DisruptorPathTrackingDataStore.class )); // IoCs.processInstance(new DisruptorPathTrackingDataStore()) } }