DESCRIPTION

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: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-01-28 22:00:21.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-01-28 23:48:08.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5238/

-------------------------------------
author: Brenden Conley
date: 2014-01-29 00:44:31.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5238/ : SUCCESS

-------------------------------------
author: Ivy Mitchell
date: 2014-02-06 22:36:42.000000000

Patch Set 2: Code-Review-1

-------------------------------------
author: Ivy Mitchell
date: 2014-02-06 22:42:59.000000000

Patch Set 2:

(1 comment)

Line:291, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> please at least put a message or something in this rte, not a fan of making a method that throws an exception or runtime exception.

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-06 23:14:04.000000000

Patch Set 2:

(1 comment)

Line:291, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> Good point, I'll add a message.

I'll remove the FIXME though, it's really not trivial to throw exceptions here, and it would pollute the API across the board. If the user could create the file in the first place, he should retain permission etc. to write to it in most cases.

The highest chance of something not working here would be logic errors in the state system, and for that you want to get runtime exceptions to see the problem right away.

-------------------------------------
