tmf: Synchronize accesses to HistoryTree's latest branch
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 28 Jan 2014 18:38:50 +0000 (13:38 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 11 Feb 2014 22:37:58 +0000 (17:37 -0500)
commit412a0225e21359fe46cdc414853b5e08eaeaa02c
treee1c08a61a7110a80df0ef44062a4cc93dc6df900
parent58129ff75640252ed47f06e74bb29b21de6ebe38
tmf: Synchronize accesses to HistoryTree's latest branch

Most accesses are punctual, so the synchronizedList wrapper covers
for most of them. There is the iteration in readNode() that is done
by reader threads, but it's usually very quick, so there was not
really much advantage of using a ReadWriteLock - considering the
downside of more verbose locking.

Also made the list final and avoided exposing it publicly - the
backend object only needs the root node.

Change-Id: I46c315d46a5e96d609c052d4cedb4404fe765176
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/21219
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Hudson CI
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTreeBackend.java
This page took 0.027104 seconds and 5 git commands to generate.