You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2019/11/05 17:15:00 UTC

[jira] [Updated] (SLING-8737) Add support for lazily-evaluated bindings

     [ https://issues.apache.org/jira/browse/SLING-8737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Cotescu updated SLING-8737:
--------------------------------
    Fix Version/s: API 2.22.0

> Add support for lazily-evaluated bindings
> -----------------------------------------
>
>                 Key: SLING-8737
>                 URL: https://issues.apache.org/jira/browse/SLING-8737
>             Project: Sling
>          Issue Type: New Feature
>          Components: Scripting
>            Reporter: Radu Cotescu
>            Assignee: Radu Cotescu
>            Priority: Major
>             Fix For: Scripting Core 2.1.0, API 2.22.0
>
>
> The {{org.apache.sling.scripting.core}} module provides support for passing a {{javax.script.Bindings}} to script engines. The current implementation relies directly on {{javax.script.SimpleBindings}}, which means that the values with which the map is populated have to be computed before insertion. In some cases these computations are not trivial, however there's no guarantee that the values will actually be used.
> In order to optimise the {{Bindings}} usage, given that Java 8 and above provide the [{{Supplier}}|https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html] functional interface, the {{org.apache.sling.scripting.core}} module should optionally allow {{BindingsValuesProviders}} to provide {{Suppliers}}, which are invoked on-demand.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)