[infinispan-issues] [JBoss JIRA] (ISPN-4558) New ThreadPoolExecutorFactory API is awkward to implement
Paul Ferraro (JIRA)
issues at jboss.org
Tue Jul 22 13:11:29 EDT 2014
Paul Ferraro created ISPN-4558:
----------------------------------
Summary: New ThreadPoolExecutorFactory API is awkward to implement
Key: ISPN-4558
URL: https://issues.jboss.org/browse/ISPN-4558
Project: Infinispan
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: Configuration
Affects Versions: 7.0.0.Alpha5
Reporter: Paul Ferraro
Assignee: Dan Berindei
7.0.0.Alpha5 introduced a new ThreadPoolExecutorFactory, but the API is awkward to implement. The createExecutor(ThreadFactory) method returns a generic type, but the type of the expected result is not known to the implementor! Consequently, the implementor needs to resort to type erasure in order to force the implementation to compile.
I suggest that this implement simply return ExecutorService, and allow ScheduledExecutorService variants to override the return value. If parameterization of the ExecutorService implementation is indeed necessary, the class itself should probably be parameterized instead, since a given implementation of ThreadPoolExecutorFactory would not likely return more than one type of ExecutorService implementation.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the infinispan-issues
mailing list