Tabnine Logo
Sample.getAttributes
Code IndexAdd Tabnine to your IDE (free)

How to use
getAttributes
method
in
org.opennms.newts.api.Sample

Best Java code snippets using org.opennms.newts.api.Sample.getAttributes (Showing top 3 results out of 315)

origin: OpenNMS/newts

private Sample getRate(Sample sample) {
  ValueType<?> value = NAN;
  Sample previous = m_prevSamples.get(sample.getName());
  if (previous != null) {
    long elapsed = sample.getTimestamp().asSeconds() - previous.getTimestamp().asSeconds();
    try {
      value = new Gauge(sample.getValue().delta(previous.getValue()).doubleValue() / elapsed);
    } catch (ArithmeticException e) {
      value = NAN;
    }
  }
  return new Sample(sample.getTimestamp(), sample.getResource(), sample.getName(), GAUGE, value, sample.getAttributes());
}
origin: OpenNMS/newts

accumulation.accumulateValue(elapsedWithinInterval, elapsedBetweenSamples,
    ds.getHeartbeat(), current.getValue())
  .accumlateAttrs(current.getAttributes());
  ds.getSource(),
  accumulation.getAverage(),
  accumulation.getAttributes()));
origin: OpenNMS/newts

if (m.getAttributes() != null) {
  insert.value(SchemaConstants.F_ATTRIBUTES, m.getAttributes());
org.opennms.newts.apiSamplegetAttributes

Popular methods of Sample

  • <init>
  • getName
  • getResource
  • getTimestamp
  • getValue
  • getContext
  • getType
  • compareSample
  • display
  • getData
  • getFirst
  • getId
  • getFirst,
  • getId,
  • getLabel,
  • getMatrix,
  • getSecond,
  • getStringList,
  • getUserName,
  • intmethod,
  • isALive

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top PhpStorm plugins
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