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 Detail

      • CliFunction

        public CliFunction()
    • Method Detail

      • execute

        public final void execute​(FunctionContext<T> context)
        Description copied from interface: Function
        The 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 single 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.
        Specified by:
        execute in interface Function<T>
        Parameters:
        context - as created by Execution
      • isHA

        public boolean isHA()
        Description copied from interface: Function
        Specifies whether the function is eligible for re-execution (in case of failure).
        Specified by:
        isHA in interface Function<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