|
GemFire 5.8 | ||||||||
| 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 false
Function,
Serialized Form| Constructor Summary | |
|---|---|
FunctionAdapter()
|
|
| Method Summary | |
|---|---|
abstract Serializable |
execute(FunctionContext context)
The method which contain 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 returns a result after execution is complete. |
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 Serializable execute(FunctionContext context)
FunctionExecution.
execute in interface Functioncontext - data specific to
public abstract String getId()
FunctionFunctionService
getId in interface Functionpublic boolean hasResult()
Function
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()
FunctionReturn 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 FunctionFunctionService
|
GemFire 5.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||