geode-issues mailing list archives

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


ASF subversion and git services commented on GEODE-832:

Commit 93deadc41ace6b9b05bc3dd7e27006563fb4b11c in incubator-geode's branch refs/heads/develop
from [~upthewaterspout]
[;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:
>             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

View raw message