You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/01/25 20:48:39 UTC

[jira] [Commented] (GEODE-832) Allow lambda expressions to be passed to dunit VM.invoke calls

    [ https://issues.apache.org/jira/browse/GEODE-832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15115846#comment-15115846 ] 

ASF subversion and git services commented on GEODE-832:
-------------------------------------------------------

Commit 93deadc41ace6b9b05bc3dd7e27006563fb4b11c in incubator-geode's branch refs/heads/develop from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=93deadc ]

GEODE-832: Modifying the dunit framework to allow lambda expressions

Lambdas can now be used for VM.invoke and VM.invokeAsync. For example

vm.invoke(() -> {System.out.println("Hello from remote VM")})
String value = vm.invoke(() -> {return "Hello from remote VM")

This theoretically could be more efficient than using anonymous
classes, because they do not capture (and Serialize) a reference to
the enclosing test class unless they reference state of that class.


> Allow lambda expressions to be passed to dunit VM.invoke calls
> --------------------------------------------------------------
>
>                 Key: GEODE-832
>                 URL: https://issues.apache.org/jira/browse/GEODE-832
>             Project: Geode
>          Issue Type: Improvement
>          Components: tests
>            Reporter: Dan Smith
>            Assignee: Dan Smith
>
> The dunit framework has a VM class with invoke and invokeAsync methods that take Runnable and Callable objects. 
> It would be nice to use lambda expressions with VM.invoke, but the generated lambda is not serializable. We should create a new interface, SerializableRunnable/Callable, so that a lambda will be created implementing Serializable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)