Tabnine Logo
IoCs.findOrCreateInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
findOrCreateInstance
method
in
org.apache.sirona.configuration.ioc.IoCs

Best Java code snippets using org.apache.sirona.configuration.ioc.IoCs.findOrCreateInstance (Showing top 14 results out of 315)

origin: org.apache.sirona/sirona-core

public DelegatedCollectorPathTrackingDataStore()
{
  this.delegatedPathTrackingDataStore = IoCs.findOrCreateInstance( PathTrackingDataStore.class );
}
origin: org.apache.sirona/sirona-core

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;
}
origin: org.apache.sirona/sirona-core

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;
}
origin: org.apache.sirona/sirona-core

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;
}
origin: org.apache.sirona/sirona-core

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;
}
origin: org.apache.sirona/sirona-api

  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;
  }
}
origin: org.apache.sirona/sirona-aop

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}));
}
origin: org.apache.sirona/sirona-cassandra

public CassandraCollectorGaugeDataStore() {
  this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class);
  this.keyspace = cassandra.getKeyspace();
  this.valueFamily = cassandra.getGaugeValuesColumnFamily();
  this.markerFamily = cassandra.getMarkerGaugesColumFamily();
}
origin: org.apache.sirona/sirona-core

  public CollectorDataStoreFactory()
  {
    super( IoCs.findOrCreateInstance( CounterDataStore.class ), //
        new DelegatedCollectorGaugeDataStore(), //
        new InMemoryCollectorNodeStatusDataStore(), //
        new DelegatedCollectorPathTrackingDataStore() );
  }
}
origin: org.apache.sirona/sirona-cassandra

public CassandraCollectorCounterDataStore() {
  this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class);
  this.keyspace = cassandra.getKeyspace();
  this.markerFamily = cassandra.getMarkerCountersColumnFamily();
  this.family = cassandra.getCounterColumnFamily();
}
origin: org.apache.sirona/sirona-cassandra

public CassandraPathTrackingDataStore()
{
  this.cassandra = IoCs.findOrCreateInstance( CassandraSirona.class );
  this.keyspace = cassandra.getKeyspace();
  this.family = cassandra.getPathTrackingColumFamily();
  this.markerFamilly = cassandra.getMarkerPathTrackingColumFamily();
}
origin: org.apache.sirona/sirona-cassandra

public CassandraCollectorNodeStatusDataStore() {
  this.cassandra = IoCs.findOrCreateInstance(CassandraSirona.class);
  this.keyspace = cassandra.getKeyspace();
  this.family = cassandra.getStatusColumnFamily();
  this.markerFamily = cassandra.getMarkerStatusesColumnFamily();
}
origin: org.apache.sirona/sirona-plugins-api

final CollectorGaugeDataStore gaugeStore = IoCs.findOrCreateInstance(CollectorGaugeDataStore.class);
final Iterator<String> markers = gaugeStore.markers().iterator();
final StringBuilder builder = new StringBuilder("[");
origin: org.apache.sirona/sirona-cube

  public CubeDisruptorDataStoreFactory() {
    super(
      IoCs.processInstance(new CubeCounterDataStore()),
      IoCs.processInstance(new CubeGaugeDataStore()),
      IoCs.processInstance(new CubeNodeStatusDataStore()),
      IoCs.findOrCreateInstance( DisruptorPathTrackingDataStore.class ));
    //  IoCs.processInstance(new DisruptorPathTrackingDataStore())
  }
}
org.apache.sirona.configuration.iocIoCsfindOrCreateInstance

Popular methods of IoCs

  • processInstance
  • autoSet
  • shutdown
  • convertTo
  • getInstance
  • internalProcessInstance
  • newInstance
  • setSingletonInstance

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now