congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Pair.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
rocks.inspectit.shared.all.util.Pair
constructor

Best Java code snippets using rocks.inspectit.shared.all.util.Pair.<init> (Showing top 18 results out of 315)

origin: inspectIT/inspectIT

  /**
   * {@inheritDoc}
   */
  @Override
  public BusinessTransactionData getBusinessTransactionForId(int appId, int businessTxId) {
    return businessTransactions.get(new Pair<Integer, Integer>(appId, businessTxId));
  }
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public BusinessTransactionData getBusinessTransactionForId(int appId, int businessTxId) {
  return businessTransactions.get(new Pair<Integer, Integer>(appId, businessTxId));
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public BusinessTransactionData getBusinessTransactionForId(int appId, int businessTxId) {
  Pair<Integer, Integer> keyPair = new Pair<Integer, Integer>(appId, businessTxId);
  if (!businessTransactionsMap.containsKey(keyPair)) {
    refreshBusinessContext();
  }
  BusinessTransactionData businessTxData = businessTransactionsMap.get(keyPair);
  return businessTxData;
}
origin: inspectIT/inspectIT

/**
 * Validates the content of the email addresses input field checking whether the e-mails have a
 * correct syntax.
 *
 * @return Returns a integer-string pair indicating the line number and e-mail address that is
 *         not correct. If all e-mail addresses have a correct syntax, then this method returns
 *         <code>null</code>.
 */
private Pair<Integer, String> checkEmailText() {
  int i = 0;
  for (String address : getEmailAddresses()) {
    if (!address.isEmpty() && !EMailUtils.isValidEmailAddress(address)) {
      return new Pair<Integer, String>(i + 1, address);
    }
    i++;
  }
  return null;
}
origin: inspectIT/inspectIT

/**
 * Handles teh arrival of a new PageLoadRequest.
 *
 * @param plr
 *            the received pageloadrequest
 */
private void newPageLoadRequestReceived(PageLoadRequest plr) {
  Long sessionID = plr.getOwningSpan().getSessionId();
  Long tabID = plr.getOwningSpan().getTabId();
  Pair<Long, Long> plrSessionTabId = new Pair<Long, Long>(sessionID, tabID);
  pageLoadRequestCache.put(plrSessionTabId, plr);
  Iterator<AbstractEUMSpanDetails> it = missingPageLoadRequestsMap.get(plrSessionTabId).iterator();
  while (it.hasNext()) {
    AbstractEUMSpanDetails next = it.next();
    it.remove();
    tryPointBuildingForPendingElement(next);
  }
}
origin: inspectIT/inspectIT

/**
 * Reloads the business context data.
 */
private void refreshBusinessContext() {
  applicationMap.clear();
  businessTransactionsMap.clear();
  for (BusinessTransactionData businessTx : businessContextService.getBusinessTransactions()) {
    businessTransactionsMap.put(new Pair<Integer, Integer>(businessTx.getApplication().getId(), businessTx.getId()), businessTx);
  }
  for (ApplicationData application : businessContextService.getApplications()) {
    applicationMap.put(application.getId(), application);
  }
}
origin: inspectIT/inspectIT

/**
 * Sets {@link #businessTransactions}.
 *
 * @param businessTransactions
 *            A collection of {@link BusinessTransactionData} instances.
 */
public void setBusinessTransactions(Collection<BusinessTransactionData> businessTransactions) {
  for (BusinessTransactionData businessTx : businessTransactions) {
    this.businessTransactions.put(new Pair<Integer, Integer>(businessTx.getApplication().getId(), businessTx.getId()), businessTx);
    this.applications.put(businessTx.getApplication().getId(), businessTx.getApplication());
  }
}
origin: inspectIT/inspectIT

Pair<Long, Long> plrSessionTabId = new Pair<Long, Long>(sessId, tabId);
  result.addAll(responsibleBuilder.build(sessInfo, plr, details));
} else {
  pendingDataPoints.put(details, new Pair<>(isBrowserInfoCaptured, responsibleBuilder));
origin: inspectIT/inspectIT

/**
 * Get key for aggregation.
 *
 * @param invocationSequenceData
 *            invocationSequenceData to key should be determined
 * @return key as object
 */
public Object getAggregationKey(InvocationSequenceData invocationSequenceData) {
  if (InvocationSequenceDataHelper.hasSQLData(invocationSequenceData)) {
    return new Pair<Long, String>(invocationSequenceData.getMethodIdent(), invocationSequenceData.getSqlStatementData().getSql());
  } else if (InvocationSequenceDataHelper.hasHttpTimerData(invocationSequenceData)) {
    return new Pair<Long, String>(invocationSequenceData.getMethodIdent(), ((HttpTimerData) invocationSequenceData.getTimerData()).getHttpInfo().getUri());
  } else {
    return invocationSequenceData.getMethodIdent();
  }
}
origin: inspectIT/inspectIT

  @SuppressWarnings("unchecked")
  @Override
  public void onRemoval(RemovalNotification<AbstractEUMSpanDetails, Pair<Boolean, AbstractEUMPointBuilder>> notification) {
    AbstractEUMSpanDetails element = notification.getKey();
    synchronized (element) {
      AbstractEUMPointBuilder builder = notification.getValue().getSecond();
      Long sessId = element.getOwningSpan().getSessionId();
      Long tabId = element.getOwningSpan().getTabId();
      Pair<Long, Long> plrSessionTabId = new Pair<Long, Long>(sessId, tabId);
      missingSessionInfosMap.remove(sessId, element);
      missingPageLoadRequestsMap.remove(plrSessionTabId, element);
      // Force a write even if data is still missing in case of an cache
      // eviction because of the timeout
      if (notification.getCause() != RemovalCause.EXPLICIT) {
        PageLoadRequest plr = pageLoadRequestCache.getIfPresent(plrSessionTabId);
        UserSessionInfo sessionInfo = sessionInfoCache.getIfPresent(sessId);
        dataPointsToWrite.addAll(builder.build(sessionInfo, plr, element));
      }
    }
  }
}).build();
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public BusinessTransactionData registerBusinessTransaction(ApplicationData application, BusinessTransactionDefinition businessTransactionDefinition, String businessTransactionName) {
  int businessTxId = deriveInstanceId(businessTransactionName, businessTransactionDefinition.getId());
  BusinessTransactionData businessTransaction = getBusinessTransactionForId(application.getId(), businessTxId);
  if (null == businessTransaction) {
    businessTransaction = new BusinessTransactionData(businessTxId, businessTransactionDefinition.getId(), application, businessTransactionName);
    Pair<Integer, Integer> key = new Pair<Integer, Integer>(application.getId(), businessTransaction.getId());
    BusinessTransactionData existingBusinessTx = businessTransactions.putIfAbsent(key, businessTransaction);
    if (null != existingBusinessTx) {
      businessTransaction = existingBusinessTx;
    }
  }
  return businessTransaction;
}
origin: inspectIT/inspectIT

Pair<Long, Long> plrSessionTabId = new Pair<Long, Long>(sessId, tabId);
origin: inspectIT/inspectIT

  @Test
  private void ifTheAggregatedObjectHasHttpTimerDataAndIsDefinedInTheMapItMustBeAggregatedToTheDiagnosisAggregator() {
    InvocationSequenceData invocationSequenceData = new InvocationSequenceData(new Timestamp(10L), 10L, 20L, 2L);
    diagnosisDataAggregationPerformer = new DiagnosisDataAggregationPerformer();
    HttpTimerData timerData = new HttpTimerData(new Timestamp(10), 10, 10, 108L);
    HttpInfo httpInfo = new HttpInfo("URI", "requestMethod", "headerValue");
    timerData.setHttpInfo(httpInfo);
    invocationSequenceData.setTimerData(timerData);
    Object key = new Pair<Long, String>(invocationSequenceData.getMethodIdent(), ((HttpTimerData) invocationSequenceData.getTimerData()).getHttpInfo().getUri());
    diagnosisDataAggregationPerformer.diagnosisDataAggregationMap.put(key, alreadyAggregatedObject);
    diagnosisDataAggregationPerformer.aggregateInvocationSequenceData(invocationSequenceData);
    verify(alreadyAggregatedObject, times(1)).aggregate(invocationSequenceData);
  }
}
origin: inspectIT/inspectIT

@Test
private void ifTheAggregatedObjectHasSQLDataAndIsDefinedInTheMapItMustBeAggregatedToTheDiagnosisAggregator() {
  InvocationSequenceData invocationSequenceData = new InvocationSequenceData(new Timestamp(10L), 10L, 20L, 2L);
  diagnosisDataAggregationPerformer = new DiagnosisDataAggregationPerformer();
  SqlStatementData sqlStatementData = new SqlStatementData(new Timestamp(10), 10, 10, 108L);
  sqlStatementData.setCount(1);
  sqlStatementData.setSql("blahblahblah");
  invocationSequenceData.setSqlStatementData(sqlStatementData);
  HttpTimerData timerData = new HttpTimerData(new Timestamp(10), 10, 10, 108L);
  invocationSequenceData.setTimerData(timerData);
  Object key = new Pair<Long, String>(invocationSequenceData.getMethodIdent(), invocationSequenceData.getSqlStatementData().getSql());
  diagnosisDataAggregationPerformer.diagnosisDataAggregationMap.put(key, alreadyAggregatedObject);
  diagnosisDataAggregationPerformer.aggregateInvocationSequenceData(invocationSequenceData);
  verify(alreadyAggregatedObject, times(1)).aggregate(invocationSequenceData);
}
origin: inspectIT/inspectIT

  @Test
  private void ifTheAggregatedObjectIsNotDefineInTheMapItMustBeAggregated() {
    InvocationSequenceData invocationSequenceData = new InvocationSequenceData(new Timestamp(10L), 10L, 20L, 2L);
    diagnosisDataAggregationPerformer = new DiagnosisDataAggregationPerformer();
    SqlStatementData sqlStatementData = new SqlStatementData(new Timestamp(10), 10, 10, 108L);
    sqlStatementData.setCount(1);
    sqlStatementData.setSql("blahblahblah");
    invocationSequenceData.setSqlStatementData(sqlStatementData);
    TimerData timerData = new TimerData(new Timestamp(10), 10, 10, 108L);
    invocationSequenceData.setTimerData(timerData);
    Object key = new Pair<Long, String>(invocationSequenceData.getMethodIdent(), invocationSequenceData.getSqlStatementData().getSql());
    AggregatedDiagnosisData alreadyAggregatedObject = new AggregatedDiagnosisData(SourceType.TIMERDATA, invocationSequenceData, key);
    diagnosisDataAggregationPerformer.diagnosisDataAggregationMap.put(key, alreadyAggregatedObject);
    InvocationSequenceData secondInvocationSequenceData = new InvocationSequenceData(new Timestamp(10L), 10L, 20L, 2L);
    secondInvocationSequenceData.setTimerData(timerData);
    List<InvocationSequenceData> invocationSequenceDataList = new ArrayList<>();
    invocationSequenceDataList.add(invocationSequenceData);
    invocationSequenceDataList.add(secondInvocationSequenceData);
    diagnosisDataAggregationPerformer.aggregateInvocationSequenceDataList(invocationSequenceDataList);
    List<AggregatedDiagnosisData> resultList = diagnosisDataAggregationPerformer.getAggregationResultList();
    assertThat("The list must have 2 aggregated objects", resultList.size(), is(2));
    assertThat("The first aggregated object must have the same method ident that the invocationSequenceData", resultList.get(0).getMethodIdent(), equalTo(invocationSequenceData.getMethodIdent()));
    assertThat("The second aggregated object must have the same method ident that the secondInvocationSequenceData", resultList.get(1).getMethodIdent(),
        equalTo(secondInvocationSequenceData.getMethodIdent()));
  }
}
origin: inspectIT/inspectIT

when(rootCause.getMethodIdent()).thenReturn(detectedProblemContext.getNestedSequences().get(0).getMethodIdent());
when(rootCause.size()).thenReturn(2);
Pair<Long, String> pair = new Pair<Long, String>(detectedProblemContext.getNestedSequences().get(0).getMethodIdent(), "somethingsomething");
when(rootCause.getAggregationKey()).thenReturn(pair);
when(problemContext.getCommonContext()).thenReturn(commonContext);
origin: inspectIT/inspectIT

when(rootCause.getMethodIdent()).thenReturn(detectedProblemContext.getNestedSequences().get(0).getMethodIdent());
when(rootCause.size()).thenReturn(2);
Pair<Long, String> pair = new Pair<Long, String>(detectedProblemContext.getNestedSequences().get(0).getMethodIdent(), "n.a.");
when(rootCause.getAggregationKey()).thenReturn(pair);
when(problemContext.getCommonContext()).thenReturn(commonContext);
origin: inspectIT/inspectIT

textLabel.setText("");
externalServiceLabelMap.put(service, new Pair<>(iconLabel, textLabel));
rocks.inspectit.shared.all.utilPair<init>

Javadoc

Constructor.

Popular methods of Pair

  • getSecond
    Gets #second.
  • getFirst
    Gets #first.

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • JComboBox (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top 25 Plugins for Webstorm
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