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-393) FunctionContext should provide a Cache
Date Fri, 21 Jul 2017 21:01:00 GMT

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

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

Commit 5551b3feb1e85d1c7eae207583e505f11ed26720 in geode's branch refs/heads/feature/GEM-1483
from [~jinmeiliao]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=5551b3f ]

GEODE-393: GetRegionFunction uses the cache in the FunctionContext


> 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
>              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
(v6.4.14#64029)

Mime
View raw message