Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This makes it impossible to write pure unit tests for the function code that mock the cache. 

See

Jira
showSummaryfalse
serverASF JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyGEODE-393
for more details.

Functions invoked with onRegion always have to cast the FunctionContext to RegionFunctionContext

...

Code Block
public void execute(FunctionContext context) {
    RegionFunctionContext ctx = (RegionFunctionContext) context;
 

See
Jira
showSummaryfalse
serverASF JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyGEODE-394
for more details

Getting the local data set of a function is not intuitive, uses static functions that expect concrete objects

...

We can also get rid of FunctionAdapter in favor of using default methods on Function. 

See

Jira
showSummaryfalse
serverASF JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyGEODE-641

Suggested API changes

Instead of a single Function interface, there should be multiple interfaces for different types of functions. TODO - Do we really need VoidFunction (equivalent to hasResult() == false)The function interface should return a value. For functions that don't return a value, they can return null.

Code Block
interface RegionFunction<T> {
  public T execute(RegionFunctionContext context)
}

interface Function<T> {
  public T execute(FunctionContext context)
}

...