Tabnine Logo
ResultComparator
Code IndexAdd Tabnine to your IDE (free)

How to use
ResultComparator
in
rocks.inspectit.shared.cs.communication.comparator

Best Java code snippets using rocks.inspectit.shared.cs.communication.comparator.ResultComparator (Showing top 20 results out of 315)

origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public Collection<? extends Span> getRootSpans(int limit, Date fromDate, Date toDate, ResultComparator<AbstractSpan> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  return spanDao.getRootSpans(limit, fromDate, toDate, resultComparator);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
@Override
public int compare(Viewer viewer, Object o1, Object o2) {
  if (null == comparator) {
    return 0;
  }
  // just return 0 if we don't want to sort
  if (SortState.NONE.equals(sortState)) {
    return 0;
  }
  T e1 = (T) o1;
  T e2 = (T) o2;
  return comparator.compare(e1, e2);
}
origin: inspectIT/inspectIT

/**
 * Toggles the sorting of the column.
 *
 * @param id
 *            The comparator provider.
 */
protected void toggleSortColumn(ResultComparator<T> id) {
  if (comparator == id) { // NOPMD
    switch (sortState) {
    case NONE:
      sortState = SortState.UP;
      comparator.setAscending(true);
      break;
    case UP:
      sortState = SortState.DOWN;
      comparator.setAscending(false);
      break;
    case DOWN:
      sortState = SortState.NONE;
      break;
    default:
      break;
    }
  } else {
    comparator = id;
    sortState = SortState.UP;
    comparator.setAscending(true);
  }
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  TableViewerComparator<TimerData> timerDataViewerComparator = new TableViewerComparator<>();
  for (Column column : Column.values()) {
    ResultComparator<TimerData> resultComparator = new ResultComparator<>(column.dataComparator, cachedDataService);
    timerDataViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
  }
  return timerDataViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  TableViewerComparator<JmxSensorValueData> timerDataViewerComparator = new TableViewerComparator<>();
  for (Column column : Column.values()) {
    ResultComparator<JmxSensorValueData> resultComparator = new ResultComparator<>(column.dataComparator, cachedDataService);
    timerDataViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
  }
  return timerDataViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@MethodLog
public List<ExceptionSensorData> getUngroupedExceptionOverview(ExceptionSensorData template, Date fromDate, Date toDate, ResultComparator<ExceptionSensorData> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  List<ExceptionSensorData> result = exceptionSensorDataDao.getUngroupedExceptionOverview(template, fromDate, toDate, resultComparator);
  return result;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  TreeViewerComparator<SqlStatementData> sqlViewerComparator = new DatabaseSqlTreeComparator();
  for (Column column : Column.values()) {
    if (null != column.dataComparator) {
      ResultComparator<SqlStatementData> resultComparator = new ResultComparator<>(column.dataComparator, cachedDataService);
      sqlViewerComparator.addColumn(getMappedTreeViewerColumn(column).getColumn(), resultComparator);
    }
  }
  return sqlViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 * <p>
 * Will only compare if the conditions are met.
 */
@Override
public int compare(T o1, T o2) {
  if ((compareInRawMode && isRawMode()) || (compareInAggregatedMode && !isRawMode())) {
    return super.compare(o1, o2);
  } else {
    return 0;
  }
};
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@MethodLog
public List<InvocationSequenceData> getInvocationSequenceOverview(long platformId, Collection<Long> invocationIdCollection, int limit, ResultComparator<InvocationSequenceData> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  List<InvocationSequenceData> result = invocationDataDao.getInvocationSequenceOverview(platformId, invocationIdCollection, limit, resultComparator);
  return result;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  RemoteTableViewerComparator<InvocationSequenceData> invocOverviewViewerComparator = new RemoteTableViewerComparator<InvocationSequenceData>() {
    @Override
    protected void sortRemotely(ResultComparator<InvocationSequenceData> resultComparator) {
      if (null != resultComparator) {
        InvocOverviewInputController.this.resultComparator = resultComparator;
      } else {
        InvocOverviewInputController.this.resultComparator = defaultComparator;
      }
      loadDataFromService();
    }
  };
  for (Column column : Column.values()) {
    // since it is remote sorting we do not provide local cached data service
    ResultComparator<InvocationSequenceData> resultComparator = new ResultComparator<>(column.dataComparator);
    invocOverviewViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
  }
  return invocOverviewViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@MethodLog
public List<ExceptionSensorData> getUngroupedExceptionOverview(ExceptionSensorData template, int limit, Date fromDate, Date toDate, ResultComparator<ExceptionSensorData> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  List<ExceptionSensorData> result = exceptionSensorDataDao.getUngroupedExceptionOverview(template, limit, fromDate, toDate, resultComparator);
  return result;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  RemoteTableViewerComparator<ExceptionSensorData> exceptionViewerComparator = new RemoteTableViewerComparator<ExceptionSensorData>() {
    @Override
    protected void sortRemotely(ResultComparator<ExceptionSensorData> resultComparator) {
      if (null != resultComparator) {
        UngroupedExceptionOverviewInputController.this.resultComparator = resultComparator;
      } else {
        UngroupedExceptionOverviewInputController.this.resultComparator = defaultComparator;
      }
      loadDataFromService();
    }
  };
  for (Column column : Column.values()) {
    // since it is remote sorting we do not provide local cached data service
    ResultComparator<ExceptionSensorData> resultComparator = new ResultComparator<>(column.dataComparator);
    exceptionViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
  }
  return exceptionViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@MethodLog
public List<InvocationSequenceData> getInvocationSequenceOverview(long platformId, long methodId, int limit, ResultComparator<InvocationSequenceData> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  List<InvocationSequenceData> result = invocationDataDao.getInvocationSequenceOverview(platformId, methodId, limit, resultComparator);
  return result;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  RemoteTableViewerComparator<AbstractSpan> spanViewerComparator = new RemoteTableViewerComparator<AbstractSpan>() {
    @Override
    protected void sortRemotely(ResultComparator<AbstractSpan> resultComparator) {
      if (null != resultComparator) {
        TraceOverviewInputController.this.resultComparator = resultComparator;
      } else {
        TraceOverviewInputController.this.resultComparator = defaultComparator;
      }
      loadDataFromService();
    }
  };
  for (Column column : Column.values()) {
    if (null != column.dataComparator) {
      ResultComparator<AbstractSpan> resultComparator = new ResultComparator<>(column.dataComparator);
      spanViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
    }
  }
  return spanViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@MethodLog
public List<ExceptionSensorData> getUngroupedExceptionOverview(ExceptionSensorData template, int limit, ResultComparator<ExceptionSensorData> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  List<ExceptionSensorData> result = exceptionSensorDataDao.getUngroupedExceptionOverview(template, limit, resultComparator);
  return result;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  TableViewerComparator<InvocationSequenceData> invocationDataViewerComparator = new TableViewerComparator<>();
  for (Column column : Column.values()) {
    ResultComparator<InvocationSequenceData> resultComparator = new ResultComparator<>(column.dataComparator, getCachedDataService());
    invocationDataViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
  }
  return invocationDataViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@MethodLog
public List<ExceptionSensorData> getUngroupedExceptionOverview(ExceptionSensorData template, ResultComparator<ExceptionSensorData> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  List<ExceptionSensorData> result = exceptionSensorDataDao.getUngroupedExceptionOverview(template, resultComparator);
  return result;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  TableViewerComparator<InvocationSequenceData> invocationDataViewerComparator = new TableViewerComparator<>();
  for (Column column : Column.values()) {
    ResultComparator<InvocationSequenceData> resultComparator = new ResultComparator<>(column.dataComparator, getCachedDataService());
    invocationDataViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
  }
  return invocationDataViewerComparator;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
@MethodLog
public List<InvocationSequenceData> getInvocationSequenceOverview(long platformId, int limit, ResultComparator<InvocationSequenceData> resultComparator) {
  if (null != resultComparator) {
    resultComparator.setCachedDataService(cachedDataService);
  }
  List<InvocationSequenceData> result = invocationDataDao.getInvocationSequenceOverview(platformId, limit, resultComparator);
  return result;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public ViewerComparator getComparator() {
  TableViewerComparator<InvocationSequenceData> invocationDataViewerComparator = new TableViewerComparator<>();
  for (Column column : Column.values()) {
    ResultComparator<InvocationSequenceData> resultComparator = new ResultComparator<>(column.dataComparator, getCachedDataService());
    invocationDataViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
  }
  return invocationDataViewerComparator;
}
rocks.inspectit.shared.cs.communication.comparatorResultComparator

Javadoc

Result comparator implements the Comparator interface and serves to keep track on sorting type (ascending/descending) and to provide CachedDataService to the delegating comparator.

Most used methods

  • setCachedDataService
    Sets #cachedDataService.
  • <init>
    Constructor that sets only comparator and ascending.
  • compare
  • setAscending
    Sets #ascending.

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Collectors (java.util.stream)
  • Github Copilot alternatives
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