Codota Logo
Average.addValues
Code IndexAdd Codota to your IDE (free)

How to use
addValues
method
in
sirius.kernel.health.Average

Best Java code snippets using sirius.kernel.health.Average.addValues (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: com.scireum/sirius-kernel

/**
 * Adds the given value to the set of values on which the average is based.
 * <p>
 * If the sum of all values is greater as <tt>Double.MAX_VALUE / 2</tt> or the count of all values is greater as
 * <tt>Long.Max_VALUE / 2</tt>, the average is resetted.
 *
 * @param value to value to add to the average
 */
public void addValue(double value) {
  addValues(1, value);
}
origin: com.scireum/sirius-db

protected void tryCommit(boolean cascade) {
  if (stmt == null) {
    return;
  }
  if (batchBacklog > 0) {
    try {
      Watch w = Watch.start();
      stmt.executeBatch();
      avarage.addValues(batchBacklog, w.elapsedMillis());
      batchBacklog = 0;
    } catch (SQLException e) {
      if (cascade) {
        context.safeClose();
      }
      throw Exceptions.handle()
              .to(OMA.LOG)
              .error(e)
              .withSystemErrorMessage("An error occured while batch executing a statement: %s (%s)")
              .handle();
    }
  }
}
sirius.kernel.healthAverageaddValues

Javadoc

Adds the given number of values to the counter and increments the sum by the given delta.

Popular methods of Average

  • addValue
    Adds the given value to the set of values on which the average is based. If the sum of all values is
  • getCount
    Returns the number of total values inserted in the average.
  • getAndClear
    Returns the average just like #getAvg() but then resets the internal buffers to zero.
  • getAvg
    Returns the average of the added values. Returns the sliding average of the last 100 values
  • <init>
    Creates a new average which averages up to maxSamples and then computes the effective avarage and re

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
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