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 Summary
Fields Modifier and Type Field Description ConcurrentLinkedDeque<CnossosPath>cnossosPathsAtomicLongqueueSizeAs reading the size of the queue is a O(n) operation, this attribute store the current number of elements in the stacksConcurrentLinkedDeque<ReceiverNoiseLevel>receiverLevelsAtomicLongtotalRaysInserted
-
Constructor Summary
Constructors Constructor Description ResultsCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getColumnNames()String[]getCurrentValues()voidtick(long currentMillis)Called with little intervals in order to process metrics on the same thread than the call to getCurrentValues
-
-
-
Field Detail
-
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
-
cnossosPaths
public final ConcurrentLinkedDeque<CnossosPath> cnossosPaths
-
-
Method Detail
-
getColumnNames
public String[] getColumnNames()
- Specified by:
getColumnNamesin interfaceProfilerThread.Metric
-
getCurrentValues
public String[] getCurrentValues()
- Specified by:
getCurrentValuesin interfaceProfilerThread.Metric
-
tick
public void tick(long currentMillis)
Description copied from interface:ProfilerThread.MetricCalled with little intervals in order to process metrics on the same thread than the call to getCurrentValues- Specified by:
tickin interfaceProfilerThread.Metric- Parameters:
currentMillis- Time
-
-