Class ResultsCache

java.lang.Object
org.noise_planet.noisemodelling.jdbc.output.ResultsCache
All Implemented Interfaces:
ProfilerThread.Metric

public class ResultsCache extends Object implements ProfilerThread.Metric
Store results in memory, awaiting writing on sql database
  • Field Details

    • queueSize

      public final AtomicLong queueSize
      As reading the size of the queue is a O(n) operation, this attribute store the current number of elements in the stacks
    • totalRaysInserted

      public final AtomicLong totalRaysInserted
    • receiverLevels

      public final ConcurrentLinkedDeque<ReceiverNoiseLevel> receiverLevels
    • attenuationOutputs

      public final ConcurrentLinkedDeque<AttenuationOutput> attenuationOutputs
    • statisticsSumDistanceCutSource

      public final AtomicLong statisticsSumDistanceCutSource
    • statisticsSumDistanceCutSourceCount

      public final AtomicInteger statisticsSumDistanceCutSourceCount
    • statisticsSumSourcesCount

      public final AtomicLong statisticsSumSourcesCount
    • statisticsSumSourcesCountIgnored

      public final AtomicLong statisticsSumSourcesCountIgnored
    • cutProfileCount

      public final AtomicInteger cutProfileCount
  • Constructor Details

    • ResultsCache

      public ResultsCache()
  • Method Details

    • getColumnNames

      public String[] getColumnNames()
      Specified by:
      getColumnNames in interface ProfilerThread.Metric
    • getCurrentValues

      public String[] getCurrentValues()
      Specified by:
      getCurrentValues in interface ProfilerThread.Metric
    • getAverageCutSourceDistance

      public double getAverageCutSourceDistance()
      Get the average distance at which noise sources are ignored for all receivers
      Returns:
      the average distance at which noise sources are ignored for all receivers
    • getPercentageIgnoredSources

      public double getPercentageIgnoredSources()
      Get the percentage of ignored sources.
      Returns:
      Percentage of ignored sources.
    • tick

      public void tick(long currentMillis)
      Description copied from interface: ProfilerThread.Metric
      Called with little intervals in order to process metrics on the same thread than the call to getCurrentValues
      Specified by:
      tick in interface ProfilerThread.Metric
      Parameters:
      currentMillis - Time