You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Anthony Baker (JIRA)" <ji...@apache.org> on 2018/03/01 19:39:00 UTC

[jira] [Commented] (GEODE-393) FunctionContext should provide a Cache

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

Anthony Baker commented on GEODE-393:
-------------------------------------

Can this issue be closed now?

> FunctionContext should provide a Cache
> --------------------------------------
>
>                 Key: GEODE-393
>                 URL: https://issues.apache.org/jira/browse/GEODE-393
>             Project: Geode
>          Issue Type: Improvement
>          Components: functions
>            Reporter: Dan Smith
>            Assignee: David Anuta
>            Priority: Major
>              Labels: starter
>             Fix For: 1.3.0
>
>
> FunctionContext has methods to get the arguments to the function and the result sender, but there is no way to get the Cache or DistributedSystem.
> This means pretty much any function will need to statically look up the cache using CacheFactory.getAnyInstance(). While that works, it makes it impossible to write unit tests for functions by passing in a mock cache.
> Note that onRegion functions are provided a RegionFunctionContext, which does provide these functions with a means to look up the cache, but not all functions are applied to a region.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)