tmf: Rework analysis-returning methods in ITmfTrace
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 27 Jan 2014 19:33:20 +0000 (14:33 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 3 Feb 2014 03:19:43 +0000 (22:19 -0500)
commitff3f02c861e15775cdd2f4263b98fb9634359bbf
tree877473e522032c826d0b876c39e948f2eb6812d8
parent1cf2531114f2ff545e67a9450dfa7243fb5dacdd
tmf: Rework analysis-returning methods in ITmfTrace

Make the analysis accesses thread-safe: each access is now encased
in a synchronized block (or using the synchronizedMap wrapper).

This also implies exposing only Iterable's in the interface, which
is a good practice in general. If a caller could get a reference to
the map (even through unmodifiableMap), we'd have no guarantee that
they'd correctly lock their iterations, which could result in a
concurrent access error if the map is modified internally at the
same time.

Change-Id: Ibd2f1130ab9839ad20c3df3ac7c92119754ecc42
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/21152
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/ITmfAnalysisModuleWithStateSystems.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfAnalysisElement.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statesystem/TmfStateSystemExplorer.java
This page took 0.030202 seconds and 5 git commands to generate.