Package org.opentrafficsim.draw.graphs
Class GraphUpdater<T>
java.lang.Object
org.opentrafficsim.draw.graphs.GraphUpdater<T>
- Type Parameters:
T
- type of value in queue
The GraphUpdater can be used to repeatedly offer a value that is automatically processed in order of offering in a parallel
Thread.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static interface
Functional interface for updates to perform. -
Constructor Summary
ConstructorDescriptionGraphUpdater
(String workerName, Thread invokingThread, GraphUpdater.Updater<T> updater) Constructs and starts a thread that performs each given task from a queue. -
Method Summary
-
Constructor Details
-
GraphUpdater
Constructs and starts a thread that performs each given task from a queue.- Parameters:
workerName
- String; name for the working threadinvokingThread
- Thread; invoking thread, the worker will stop when this thread is interruptedupdater
- Updater<T>; updater to perform with the queued value
-
-
Method Details