Tabnine Logo
rocks.inspectit.shared.all.util
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using rocks.inspectit.shared.all.util (Showing top 20 results out of 315)

origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void shutdown(boolean awaitShutdown) {
  ExecutorServiceUtils.shutdownExecutor(diagnosisServiceExecutor, SHUTDOWN_TIMEOUT, TimeUnit.SECONDS);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public int compareTo(ParameterContentData other) {
  return ObjectUtils.compare(name, other.name);
}
origin: inspectIT/inspectIT

/**
 * <p>
 * Decides if the Java version matches.
 * </p>
 *
 * @param versionPrefix
 *            the prefix for the java version
 * @return true if matches, or false if not or can't determine
 */
private static boolean getJavaVersionMatches(String versionPrefix) {
  return isJavaVersionMatch(JAVA_VERSION_TRIMMED, versionPrefix);
}
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

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = (prime * result) + ((getFirst() == null) ? 0 : getFirst().hashCode());
  result = (prime * result) + ((getSecond() == null) ? 0 : getSecond().hashCode());
  return result;
}
origin: inspectIT/inspectIT

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

/**
 * Initializes {@link #configDirFile}.
 */
protected void init() {
  try {
    configDirFile = ResourcesPathResolver.getResourceFile(CONFIG_DIR);
  } catch (IOException exception) {
    throw new BeanInitializationException("Property manager can not locate configuration directory.", exception);
  }
}
origin: inspectIT/inspectIT

/**
 * Returns if any storage in collection of storages does contain given label.
 *
 * @param label
 *            Label to search for.
 * @param labelsInStorages
 *            Storages to check.
 * @return True if label exists in one of given storages.
 */
private boolean isLabelExistsInStorage(AbstractStorageLabel<?> label, Set<AbstractStorageLabel<?>> labelsInStorages) {
  for (AbstractStorageLabel<?> labelInStorage : labelsInStorages) {
    if (ObjectUtils.equals(label, labelInStorage)) {
      return true;
    }
  }
  return false;
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
protected boolean prove(String value) {
  if (value.isEmpty()) {
    return true;
  }
  return EMailUtils.isValidEmailAddress(value);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 * <p>
 * Comparing by from date.
 */
@Override
public int compareTo(TimeFrame other) {
  return from.compareTo(other.getFrom());
}
origin: inspectIT/inspectIT

/**
 * Returns the JVM provider.
 *
 * @return Returns the JVM provider.
 */
private static JvmProvider getJvmProvider() {
  if (getJavaVendorMatches("Sun")) {
    return JvmProvider.SUN;
  } else if (getJavaVendorMatches("Oracle Corporation")) {
    return JvmProvider.ORACLE;
  } else if (getJavaVendorMatches("IBM")) {
    return JvmProvider.IBM;
  } else if (getJavaVendorMatches("Azul")) {
    return JvmProvider.AZUL;
  } else {
    return JvmProvider.OTHER;
  }
}
origin: inspectIT/inspectIT

@Override
public V put(K key, V value) {
  V forReturn = super.put(key, value);
  if (super.size() > capacity) {
    removeEldest();
  }
  return forReturn;
}
origin: inspectIT/inspectIT

  /**
   * removes the eldest element from the FifoMap.
   */
  private void removeEldest() {
    Iterator<K> iterator = this.keySet().iterator();
    if (iterator.hasNext()) {
      iterator.next();
      iterator.remove();
    }
  }
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void write(Kryo kryo, Output output, Object object) {
  delegateSerializer.write(kryo, output, hibernateUtil.getUnproxiedObject(object));
}
origin: inspectIT/inspectIT

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

/**
 * Shutting down the used executor service.
 */
@PreDestroy
protected void shutDownExecutorService() {
  ExecutorServiceUtils.shutdownExecutor(scheduledExecutorService, 5L, TimeUnit.SECONDS);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public IWizardPage getPreviousPage(IWizardPage page) {
  if (ObjectUtils.equals(page, importStorageInfoPage)) {
    importStorageInfoPage.reset();
  }
  return super.getPreviousPage(page);
}
origin: inspectIT/inspectIT

/**
 * The comparison is based on the elements' timestamps.
 * <p>
 * {@inheritDoc}
 *
 */
@Override
public int compareTo(InvocationTreeElement o) {
  return ObjectUtils.compare(getTimeStamp(), o.getTimeStamp());
}
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

/**
 * {@inheritDoc}
 */
@Override
public int compare(ExceptionSensorData o1, ExceptionSensorData o2) {
  switch (this) {
  case FQN:
    return ObjectUtils.compare(o1.getThrowableType(), o2.getThrowableType());
  case ERROR_MESSAGE:
    return ObjectUtils.compare(o1.getErrorMessage(), o2.getErrorMessage());
  default:
    return 0;
  }
}
rocks.inspectit.shared.all.util

Most used classes

  • Pair
    Simple Pair of two objects. TODO: remove when commons lang are updated to version 3.0+
  • ExecutorServiceUtils
  • ObjectUtils
    Utility class for handling currently a proper equals comparison of objects.
  • ResourcesPathResolver
    This class helps in finding resources during runtime.
  • EMailUtils
    Utility methods for Strings.
  • TimeFrame,
  • ResourceUtils,
  • FifoMap,
  • IHibernateUtil,
  • UnderlyingSystemInfo
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