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>
cnossosPaths
AtomicLong
queueSize
As reading the size of the queue is a O(n) operation, this attribute store the current number of elements in the stacksConcurrentLinkedDeque<ReceiverNoiseLevel>
receiverLevels
AtomicLong
totalRaysInserted
-
Constructor Summary
Constructors Constructor Description ResultsCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getColumnNames()
String[]
getCurrentValues()
void
tick(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:
getColumnNames
in interfaceProfilerThread.Metric
-
getCurrentValues
public String[] getCurrentValues()
- Specified by:
getCurrentValues
in interfaceProfilerThread.Metric
-
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 interfaceProfilerThread.Metric
- Parameters:
currentMillis
- Time
-
-