Package org.apache.geode.management.cli
Class CliFunction<T>
java.lang.Object
org.apache.geode.management.cli.CliFunction<T>
- All Implemented Interfaces:
Serializable,Function<T>,org.apache.geode.internal.cache.execute.InternalFunction<T>,org.apache.geode.internal.InternalEntity,Identifiable<String>
public abstract class CliFunction<T>
extends 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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal 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, waitMethods inherited from interface org.apache.geode.cache.execute.Function
getId, getRequiredPermissions, hasResult, optimizeForWriteMethods inherited from interface org.apache.geode.internal.cache.execute.InternalFunction
getRequiredPermissions
-
Constructor Details
-
CliFunction
public CliFunction()
-
-
Method Details
-
execute
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). -
executeFunction
public abstract org.apache.geode.management.internal.functions.CliFunctionResult executeFunction(FunctionContext<T> context) throws Exception - Throws:
Exception
-