DESCRIPTION

ctf: get iterable of stream input readers

This patch creates an interface IDeclarationProvider to
isolate StreamInput from the outside world.

Change-Id: If12805ba6436ab5f5ce562686f5870c0fbf05261
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2014-03-26 18:08:01.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2014-03-26 21:14:58.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2014-03-26 22:06:53.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-26 22:22:59.000000000

Patch Set 3: Code-Review-1

(4 comments)

Line:31, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java -> missing space

Line:32, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/IDeclarationProvider.java -> since 2.1??

Line:34, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/IDeclarationProvider.java -> we're trying to move away from exposing Map's. We'd probably have enough just exposing an Iterable of EventDefinition's. Then one could do EventDefinition.getId() to get its id if it wants.

That or Guava's ImmutableMap ;)

Line:258, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> you can return the List directly, Iterable does not contain any methods to modify the list. However, if the elements are mutable, then they can be modified anyway, the only thing to do in this is a deep copy. Hopefully we'll get the immutable series in so that it is not a problem anymore.

-------------------------------------
author: Ivy Mitchell
date: 2014-03-31 22:12:33.000000000

Patch Set 3: Code-Review-2

(1 comment)

this will only be interesting when events get immutable. Let's keep this on ice for now

Line:258, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> NO I CAN'T

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-31 22:17:22.000000000

Patch Set 3:

(1 comment)

Line:258, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> Disregard that, I'm just bad. Iterable has a remove() method. Dang it, so we're not safe no matter what we do!

So either we:
* Do a (shallow) copy every call
* Wrap it to unmodifiableList every call
* Save fStreamInputReaders itself as a unmodifiableList (assuming it doesn't change over the course of execution), and then that you can return directly.

Substitute unmodifiableList with Guava's ImmutableList for extra points ;)

-------------------------------------
author: Ivy Mitchell
date: 2014-04-24 22:51:33.000000000

Topic set to XML analysis

-------------------------------------
author: Ivy Mitchell
date: 2014-04-25 02:28:11.000000000

Patch Set 3:

(1 comment)

Line:258, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> with live, the list will grow. so,either wrap it at every call, or, when a stream is added.

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