[jboss-jira] [JBoss JIRA] (WFLY-5175) Add lamba support for CommandDispatcher commands.
Paul Ferraro (JIRA)
issues at jboss.org
Sat Aug 22 13:08:26 EDT 2015
[ https://issues.jboss.org/browse/WFLY-5175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Ferraro closed WFLY-5175.
------------------------------
Resolution: Rejected
On second thought - the Command interface only has a single method, thus already supports lambda expressions! And because Command extends Serializable, the resulting lambda expression will serialize just fine.
> Add lamba support for CommandDispatcher commands.
> -------------------------------------------------
>
> Key: WFLY-5175
> URL: https://issues.jboss.org/browse/WFLY-5175
> Project: WildFly
> Issue Type: Feature Request
> Components: Clustering
> Affects Versions: 10.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
>
> Currently, one needs to create a Command object for each command to be executed via a CommandDispatcher. Now that WF is on Java 8, we should add support for specifying simple commands as lambdas.
> e.g.
> dispatcher.executeOnCluster(context -> context.doSomething());
> Of course, there is the matter of serializability. I'm hoping this is a simple as making the Command interface (or some sub-interface) a @FunctionalInterface - and given that this already extends Serializable, we should be ok. This should just be a matter of experimentation.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list