geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-832) Allow lambda expressions to be passed to dunit VM.invoke calls
Date Tue, 26 Jan 2016 19:38:40 GMT

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

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

Commit 93deadc41ace6b9b05bc3dd7e27006563fb4b11c in incubator-geode's branch refs/heads/wan_cq_donation
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)

Mime
View raw message