Class AttenuationOutputSingleThread
java.lang.Object
org.noise_planet.noisemodelling.jdbc.output.AttenuationOutputSingleThread
- All Implemented Interfaces:
CutPlaneVisitor
Managed by a single thread, process all incoming vertical profile, compute attenuation and push on appropriate stack
for exporting result values in a thread safe way. It processes the receiver one at a time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classrepresenting the noise levels for different time periods.Nested classes/interfaces inherited from interface org.noise_planet.noisemodelling.pathfinder.CutPlaneVisitor
CutPlaneVisitor.PathSearchStrategy -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttenuationOutputSingleThread(AttenuationOutputMultiThread multiThreadParent, org.h2gis.api.ProgressVisitor progressVisitor) Constructs a NoiseMapInStack object with a multithreaded parent NoiseMap instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalizeReceiver(PathFinder.ReceiverPointInfo receiver) No more propagation paths will be pushed for this receiver identifieronNewCutPlane(CutProfile cutProfile) A new vertical profile between a receiver and a source has been foundvoidpushInStack(ConcurrentLinkedDeque<CnossosPath> stack, Collection<CnossosPath> data) Adds Cnossos paths to a concurrent stack while maintaining the maximum stack size.voidpushInStack(ConcurrentLinkedDeque<ReceiverNoiseLevel> stack, ReceiverNoiseLevel data) Pushes attenuation data into a concurrent linked deque.voidstartReceiver(PathFinder.ReceiverPointInfo receiver, Collection<PathFinder.SourcePointInfo> sourceList, AtomicInteger cutProfileCount) Called before looking for vertical cut planes between the receiver and the sources.
-
Field Details
-
cnossosPaths
-
cutProfileCount
-
-
Constructor Details
-
AttenuationOutputSingleThread
public AttenuationOutputSingleThread(AttenuationOutputMultiThread multiThreadParent, org.h2gis.api.ProgressVisitor progressVisitor) Constructs a NoiseMapInStack object with a multithreaded parent NoiseMap instance. This class is not thread-safe- Parameters:
multiThreadParent-
-
-
Method Details
-
onNewCutPlane
Description copied from interface:CutPlaneVisitorA new vertical profile between a receiver and a source has been found- Specified by:
onNewCutPlanein interfaceCutPlaneVisitor- Parameters:
cutProfile- vertical profile- Returns:
- Will skip or not the next processing depending on this value.
-
startReceiver
public void startReceiver(PathFinder.ReceiverPointInfo receiver, Collection<PathFinder.SourcePointInfo> sourceList, AtomicInteger cutProfileCount) Description copied from interface:CutPlaneVisitorCalled before looking for vertical cut planes between the receiver and the sources.- Specified by:
startReceiverin interfaceCutPlaneVisitor- Parameters:
receiver- Receiver informationsourceList- All sources in the range of this receiver sorted by the distance from the receivercutProfileCount-
-
pushInStack
Pushes attenuation data into a concurrent linked deque.- Parameters:
stack- Stack to feeddata- receiver noise level in dB
-
pushInStack
Adds Cnossos paths to a concurrent stack while maintaining the maximum stack size.- Parameters:
stack- Stack to feeddata- rays
-
finalizeReceiver
No more propagation paths will be pushed for this receiver identifier- Specified by:
finalizeReceiverin interfaceCutPlaneVisitor- Parameters:
receiver-
-