DESCRIPTION

Tmf: Introduce an interface for request scheduler

Now we can have many scheduler and chose between them

Change-Id: I56f413d868944d8d3c9324a2be92fc7c732c1890
Signed-off-by: Kelsie Blackwell xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2013-08-13 20:18:57.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/3176/

-------------------------------------
author: Brenden Conley
date: 2013-08-13 20:45:25.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/3176/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2013-08-15 06:41:14.000000000

Patch Set 1: Code-Review-1

(1 comment)

Sorry, I was the one who suggested an interface at first, but after seeing a prototype I think an abstract class may be more appropriate after all. There is indeed many common things that could be put in a common class. And since it's not really an externally-exposed component (at least not yet), it's not that necessary to have an interface.

fExecutorService could be in the abstract class, but don't force the type at this level. Have the constructor take the ExecutorService as parameter. And in the implementation, you can call super(..., Executors.newCachedThreadPool()) for example. This would give flexibility on how each implementation does its thing.

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/ITmfRequestExecutor.java -> This method, as well as the hasTasks() one, are never called from external component. I don't think they should be in the interface/abstract class. They could be protected/private methods instead (and OSScheduler doesn't seem to need hasTasks at all).

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