Codota Logo
SensorInstrumentationPoint.getSensorIds
Code IndexAdd Codota to your IDE (free)

How to use
getSensorIds
method
in
rocks.inspectit.shared.all.instrumentation.config.impl.SensorInstrumentationPoint

Best Java code snippets using rocks.inspectit.shared.all.instrumentation.config.impl.SensorInstrumentationPoint.getSensorIds (Showing top 18 results out of 315)

  • Common ways to obtain SensorInstrumentationPoint
private void myMethod () {
SensorInstrumentationPoint s =
  • Codota IconMethodInstrumentationConfig methodInstrumentationConfig;methodInstrumentationConfig.getSensorInstrumentationPoint()
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

  @Test
  public void priorityReverse() {
    registeredSensorConfig.addSensorId(1, PriorityEnum.MIN);
    registeredSensorConfig.addSensorId(2, PriorityEnum.MAX);
    long[] sensorIds = registeredSensorConfig.getSensorIds();
    assertThat(sensorIds.length, is(2));
    // highest priority first
    assertThat(sensorIds[0], is(2L));
    assertThat(sensorIds[1], is(1L));
  }
}
origin: inspectIT/inspectIT

@Test
public void priority() {
  registeredSensorConfig.addSensorId(1, PriorityEnum.MAX);
  registeredSensorConfig.addSensorId(2, PriorityEnum.MIN);
  long[] sensorIds = registeredSensorConfig.getSensorIds();
  assertThat(sensorIds.length, is(2));
  assertThat(sensorIds[0], is(1L));
  assertThat(sensorIds[1], is(2L));
}
origin: inspectIT/inspectIT

@Test
public void noDoubleId() {
  registeredSensorConfig.addSensorId(1, PriorityEnum.MIN);
  registeredSensorConfig.addSensorId(2, PriorityEnum.MAX);
  registeredSensorConfig.addSensorId(1, PriorityEnum.MAX);
  registeredSensorConfig.addSensorId(2, PriorityEnum.MIN);
  long[] sensorIds = registeredSensorConfig.getSensorIds();
  assertThat(sensorIds.length, is(2));
}
origin: inspectIT/inspectIT

@Test
public void instrumentationExist() throws Exception {
  long agentId = 13L;
  long sensorId = 15L;
  String sensorClassName = "sensorClassName";
  MethodSensorTypeConfig methodSensorTypeConfig = mock(MethodSensorTypeConfig.class);
  when(methodSensorTypeConfig.getId()).thenReturn(sensorId);
  when(methodSensorTypeConfig.getPriority()).thenReturn(PriorityEnum.NORMAL);
  AgentConfig agentConfiguration = mock(AgentConfig.class);
  when(agentConfiguration.getPlatformId()).thenReturn(agentId);
  when(agentConfiguration.getMethodSensorTypeConfig(sensorClassName)).thenReturn(methodSensorTypeConfig);
  Map<String, Object> settings = Collections.<String, Object> singletonMap("key", "value");
  when(assignment.getSettings()).thenReturn(settings);
  IMethodSensorConfig methodSensorConfig = mock(IMethodSensorConfig.class);
  when(methodSensorConfig.getClassName()).thenReturn(sensorClassName);
  when(environment.getMethodSensorTypeConfig(Matchers.<Class<? extends IMethodSensorConfig>> any())).thenReturn(methodSensorConfig);
  SensorInstrumentationPoint rsc = mock(SensorInstrumentationPoint.class);
  when(rsc.getSensorIds()).thenReturn(new long[] { sensorId });
  MethodInstrumentationConfig instrumentationConfig = mock(MethodInstrumentationConfig.class);
  when(instrumentationConfig.getSensorInstrumentationPoint()).thenReturn(rsc);
  when(methodType.getMethodInstrumentationConfig()).thenReturn(instrumentationConfig);
  boolean changed = applier.addInstrumentationPoints(agentConfiguration, classType);
  // verify results
  assertThat(changed, is(true));
  // verify no interaction
  verifyZeroInteractions(registrationService);
  verify(instrumentationConfig, times(0)).setSensorInstrumentationPoint(Matchers.<SensorInstrumentationPoint> any());
  verify(methodType, times(0)).setMethodInstrumentationConfig(Matchers.<MethodInstrumentationConfig> any());
}
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

assertThat(instrumentationConfig.getAllInstrumentationPoints(), hasSize(1));
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(1));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSettings(), is(settings));
assertThat(instrumentationConfig.getSpecialInstrumentationPoint(), is(nullValue()));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

assertThat(rsc.getSensorIds().length, is(2));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSensorIds()[1], is(invocationSensorId));
assertThat(rsc.isStartsInvocation(), is(true));
assertThat(rsc.isPropertyAccess(), is(true));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

SensorInstrumentationPoint rsc = instrumentationConfig.getSensorInstrumentationPoint();
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(0));
assertThat(rsc.isConstructor(), is(true));
SpecialInstrumentationPoint ssc = instrumentationConfig.getSpecialInstrumentationPoint();
origin: inspectIT/inspectIT

assertThat(instrumentationConfig.getAllInstrumentationPoints(), hasSize(1));
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(1));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSettings(), is(settings));
assertThat(instrumentationConfig.getSpecialInstrumentationPoint(), is(nullValue()));
origin: inspectIT/inspectIT

SensorInstrumentationPoint rsc = instrumentationConfig.getSensorInstrumentationPoint();
assertThat(rsc.getId(), is(methodId));
assertThat(rsc.getSensorIds().length, is(0));
assertThat(rsc.isConstructor(), is(false));
SpecialInstrumentationPoint ssc = instrumentationConfig.getSpecialInstrumentationPoint();
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

assertThat(rsc.getSensorIds().length, is(2));
assertThat(rsc.getSensorIds()[0], is(sensorId));
assertThat(rsc.getSensorIds()[1], is(invocationSensorId));
assertThat(rsc.isStartsInvocation(), is(true));
assertThat(rsc.isPropertyAccess(), is(false));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

long[] sensorIds = { 17L };
when(sensorInstrumentationPoint.getId()).thenReturn(rscId);
when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds);
when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false);
when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value"));
origin: inspectIT/inspectIT

for (long sensorId : sensorInstrumentationPoint.getSensorIds()) {
  IMethodSensor sensor = methodSensorMap.get(sensorId);
  if (null != sensor) {
origin: inspectIT/inspectIT

SensorInstrumentationPoint sensorInstrumentationPoint = config.getSensorInstrumentationPoint();
hookDispatcherMapper.addMapping(registeredSensorConfig.getId(), registeredSensorConfig);
methodToSensorMap.put(Long.valueOf(registeredSensorConfig.getId()), sensorInstrumentationPoint.getSensorIds());
rocks.inspectit.shared.all.instrumentation.config.implSensorInstrumentationPointgetSensorIds

Popular methods of SensorInstrumentationPoint

  • getId
  • getPropertyAccessorList
  • getSettings
  • isConstructor
    Gets #constructor.
  • isStartsInvocation
  • addSensorId
    Adds sensor Id if one does not exists already and properly sorts the id in the #sensorIds array base
  • containsSensorId
    If sensor if is contained in this SensorInstrumentationPoint.
  • <init>
  • addPropertyAccessor
    Adds one PropertyPathStart to the list of the property acc list.
  • addSettings
    Adds all given settings to the settings map.
  • isPropertyAccess
  • setConstructor
    Sets #constructor.
  • isPropertyAccess,
  • setConstructor,
  • setId,
  • setStartsInvocation

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now