congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
SensorInstrumentationPoint.getSensorIds
Code IndexAdd Tabnine 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)

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

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • JList (javax.swing)
  • JOptionPane (javax.swing)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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