|
GemFire 6.5.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gemstone.gemfire.cache.execute.FunctionAdapter
public abstract class FunctionAdapter
Application developers can extend this class instead of implementing the
Function interface.
This implementation provides the following defaults
Function.hasResult() returns trueFunction.optimizeForWrite() returns falseFunction.isHA() returns true
Function,
Serialized Form| Constructor Summary | |
|---|---|
FunctionAdapter()
|
|
| Method Summary | |
|---|---|
abstract void |
execute(FunctionContext context)
The method which contains the logic to be executed. |
abstract String |
getId()
Return a unique function identifier, used to register the function with FunctionService |
boolean |
hasResult()
Specifies whether the function sends results while executing. |
boolean |
isHA()
Specifies whether the function is eligible for re-execution (in case of failure). |
boolean |
optimizeForWrite()
Return true to indicate to GemFire the method requires optimization for writing the targeted FunctionService.onRegion(com.gemstone.gemfire.cache.Region) and any
associated routing objects
. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FunctionAdapter()
| Method Detail |
|---|
public abstract void execute(FunctionContext context)
Execution. The context provided to this function is the one
which was built using Execution. The contexts can be data
dependent or data-independent so user should check to see if the context
provided in parameter is instance of RegionFunctionContext.
execute in interface Functioncontext - as created by Executionpublic abstract String getId()
FunctionService
getId in interface Functionpublic boolean hasResult()
If Function.hasResult() returns false,
ResultCollector.getResult() throws FunctionException.
If Function.hasResult() returns true,
ResultCollector.getResult() blocks and waits for the result of
function execution
hasResult in interface Functionpublic boolean optimizeForWrite()
Return true to indicate to GemFire the method requires optimization for
writing the targeted
FunctionService.onRegion(com.gemstone.gemfire.cache.Region) and any
associated routing objects
.
Returning false will optimize for read behavior on the targeted
FunctionService.onRegion(com.gemstone.gemfire.cache.Region) and any
associated routing objects
.
This method is only consulted when invoked as a data dependent function
optimizeForWrite in interface FunctionFunctionServicepublic boolean isHA()
isHA in interface FunctionFunctionContext.isPossibleDuplicate()
|
GemFire 6.5.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||