VMware GemFire Java API Reference
Package org.apache.geode.management.cli
Class CliFunction<T>
- java.lang.Object
-
- org.apache.geode.management.cli.CliFunction<T>
-
- All Implemented Interfaces:
java.io.Serializable,Function<T>,org.apache.geode.internal.cache.execute.InternalFunction<T>,org.apache.geode.internal.InternalEntity,Identifiable<java.lang.String>
public abstract class CliFunction<T> extends java.lang.Object implements org.apache.geode.internal.cache.execute.InternalFunction<T>An abstract function implementation to be extended by cli functions. Any cli function extending this class has to return a CliFunctionResult.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CliFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidexecute(FunctionContext<T> context)The method which contains the logic to be executed.abstract org.apache.geode.management.internal.functions.CliFunctionResultexecuteFunction(FunctionContext<T> context)booleanisHA()Specifies whether the function is eligible for re-execution (in case of failure).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.geode.cache.execute.Function
getId, getRequiredPermissions, hasResult, optimizeForWrite
-
-
-
-
Method Detail
-
execute
public final void execute(FunctionContext<T> context)
Description copied from interface:FunctionThe method which contains the logic to be executed. This method should be thread safe and may be invoked more than once on a given member for a singleExecution. 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 ofRegionFunctionContext.
-
isHA
public boolean isHA()
Description copied from interface:FunctionSpecifies whether the function is eligible for re-execution (in case of failure).- Specified by:
isHAin interfaceFunction<T>- Returns:
- whether the function is eligible for re-execution.
- See Also:
FunctionContext.isPossibleDuplicate()
-
executeFunction
public abstract org.apache.geode.management.internal.functions.CliFunctionResult executeFunction(FunctionContext<T> context) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-