tmf: Make TransientState really re-entrant
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 23 Jan 2014 23:25:40 +0000 (18:25 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 27 Jan 2014 19:36:10 +0000 (14:36 -0500)
commit09e6fd9b37b840acca56fd20f6def476fa2bb119
tree6885b0714101194d1cf9bef54b3d900f090e1b18
parenta1529f38e193e20fc9a1b4e707b99b9a163dae05
tmf: Make TransientState really re-entrant

Wrap all reading and writing methods under a reader-writer lock.
This will allow much better consistency when querying a state
system while it is being built.

It was also required to rework the hasInfoAbout() method. Since the
state of the TransientState can change between two method invocations,
it was prone to race conditions. Now it will return the interval it
had at the time, if there is one.

Change-Id: I1a34e410eea1a02288c5388d1983e9c16ce56f0f
Reviewed-on: https://git.eclipse.org/r/21019
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/StateSystem.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/TransientState.java
This page took 0.037912 seconds and 5 git commands to generate.