...
Jira |
---|
server | ASF JIRA |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
---|
key | GEODE-728 |
---|
|
Jira |
---|
server | ASF JIRA |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
---|
key | GEODE-2217 |
---|
|
RegionFunctionContext should provide the local data set
...
Code Block |
---|
interface RegionFunction<T> {
public T execute(RegionFunctionContext context)
}
interface MemberFunction<T> {
public T execute(FunctionContext context)
} |
Combining these changes with
Jira |
---|
server | ASF JIRA |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
---|
key | GEODE-2217 |
---|
|
would result in interfaces with two generic types, one for the function argument type and another for the function return type. Code Block |
---|
interface RegionFunction<S, T> {
public T execute(RegionFunctionContext<S> context)
}
interface MemberFunction<S, T> {
public T execute(FunctionContext<S> context)
}
interface FunctionContext<S> {
public S getArguments();
} |
See
Jira |
---|
showSummary | false |
---|
server | ASF JIRA |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
---|
key | GEODE-729 |
---|
|
Add Cache.getFunctionService and deprecate the static methods on FunctionService
...
New interfaces
Code Block |
---|
interface RegionFunction<S, RegionFunction<T>T> {
public T execute(RegionFunctionContextRegionFunctionContext<S> context)
}
interface MemberFunction<S, MemberFunction<T>T> {
public T execute(FunctionContextFunctionContext<S> context)
}
interface RegionExecution<S, RegionExecution<TT,S> U> extends Execution {
public ResultCollector<T, S>U> execute(RegionFunction<T>RegionFunction<S,T> function);
}
interface MemberExecution<S, MemberExecution<TT,S> U> extends Execution {
public ResultCollector<T, S>U> execute(MemberFunction<T>MemberFunction<S,T> function);
}
|
New Methods
Code Block |
---|
FunctionService Cache.getFunctionService()
Region RegionFunctionContext.getLocalDataSet();
Execution.isHA(boolean value)
Execution.optimizeForWrite(boolean value)
Execution.hasResult(boolean value)
//New instance methods, rather than static
FunctionService {
public RegionExecution onRegion(Region region);
public MemberExecution onServer(RegionService regionService);
public MemberExecution onServers(RegionService regionService);
public MemberExecution onMember(DistributedMember distributedMember);
public MemberExecution onMembers(Set<DistributedMember> distributedMembers);
public MemberExecution onMember(String... groups);
public void registerFunction(Function function);
public void unregisterFunction(String functionId);
public boolean isRegistered(String functionId);
} |
...