Class TmfUiSignalThrottler
java.lang.Object
org.eclipse.tracecompass.tmf.core.signal.TmfSignalThrottler
org.eclipse.tracecompass.tmf.ui.signal.TmfUiSignalThrottler
"Buffer" between a TmfComponent and the signal manager. You can use this if
you want to throttle the amount of signals your component will send.
It works by specifying a delay, then calling TmfSignalThrottler.queue(org.eclipse.tracecompass.tmf.core.signal.TmfSignal). The signals will
only be really sent if no other call to TmfSignalThrottler.queue(org.eclipse.tracecompass.tmf.core.signal.TmfSignal) happens within $delay
milliseconds afterwards. This guarantees that only the *last* signal is
actually broadcasted.
Note that this class does not discriminate for signal types, sources, or whatever. If you want to throttle different signals in different ways, you can use multiple signal throttlers in your component and call them accordingly.
Unlike TmfSignalThrottler, this throttler will broadcast
the signal from the UI thread.
- Since:
- 5.0
-
Constructor Summary
ConstructorsConstructorDescriptionTmfUiSignalThrottler(@Nullable ITmfComponent component, long delay) Constructor -
Method Summary
Methods inherited from class org.eclipse.tracecompass.tmf.core.signal.TmfSignalThrottler
dispose, queue
-
Constructor Details
-
TmfUiSignalThrottler
Constructor- Parameters:
component- The optional source component of the signals. If non-null, itsITmfComponent.broadcast(org.eclipse.tracecompass.tmf.core.signal.TmfSignal)method will be used to finally send the signal. If null, the genericTmfSignalManager.dispatchSignal(org.eclipse.tracecompass.tmf.core.signal.TmfSignal)is used.delay- Time to wait before actually sending signals (in ms)
-