DESCRIPTION

tmf: refactoring of the TmfTraceProperties interface.

This patch-set changes the TraceProperties interface to
hide the implementation details (HashMap) behind the interface.

The interface TraceProperties should not force the implementation
to be an Hashmap but should force an implentation to behave "like"
an hashMap.

This modification will lead to more code cleanup where this concept
is used. More refactoring to come.

Change-Id: I7e404bdcfef1abb20ec4ae64ae755ef147004482
Signed-off-by: Jordon Obrien xxx@xxx.xxx


COMMENTS

author: Jordon Obrien
date: 2013-12-11 06:55:40.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2013-12-11 06:57:28.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2013-12-11 07:11:10.000000000

Patch Set 3: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4577/ : FAILURE

-------------------------------------
author: Ivy Mitchell
date: 2013-12-18 21:24:17.000000000

Patch Set 3:

This patch does not compile as the interface was changed and the inherited classes were not updated. This is most probably an oversight, but please make sure your code compiles before submitting it for review.

-------------------------------------
author: Jordon Obrien
date: 2013-12-18 21:25:34.000000000

Patch Set 3:

This is a draft... not for review.
Nobody was part of the review.
I asked Alex to think about some stuff.

I'll probably abandonned it soon.

-------------------------------------
author: Ivy Mitchell
date: 2013-12-18 22:03:55.000000000

Patch Set 3:

In that case, please use ref/drafts/master, not ref/for/master or indicate it somewhere.

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-14 18:37:17.000000000

Patch Set 3:

The commit message is wrong, nothing in the interface forces the HashMap implementation. Map is just an interface in Java.

Also, this interface (ITmfTraceProperties) is meant to be extended by the trace object itself, to indicate it can provide additional properties. So it cannot itself extend Iterable (that would make the trace "Iterable" too).

But it's a good point that the Map return here is a bit wide, we could probably do away with one getter that takes a key, and one iterator on the keys. It would force doing a map lookup every time (whereas now we just iterate on the entrySet ) but let's be honest, "checking the trace properties" it not something performance-critical.

I'll work on a new version.

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-15 21:45:29.000000000

Patch Set 3: Code-Review-1

In fact, this refactoring is a bit more complex than it seems at first. TmfTraceElement uses this Map in many ways (gets the size, iterates on the keys, iterates on the entries to avoid map lookups). To the point where we would just re-implement the Map interface in ITmfTraceProperties.

If somebody wants to pick this up, they are more than welcome to, I will just personally work on higher priority stuff.

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-24 20:07:40.000000000

Abandoned

Cleaning up old reviews

Java 8 streams will probably make this easier :)

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