CliFunction (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.management.cli, class: CliFunction

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:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CliFunction()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `execute(FunctionContext<T> context)`
  The method which contains the logic to be executed.
  `abstract org.apache.geode.management.internal.functions.CliFunctionResult`
  `executeFunction(FunctionContext<T> context)`
  `boolean`
  `isHA()`
  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`

  ### Methods inherited from interface org.apache.geode.internal.cache.execute.InternalFunction

  `getRequiredPermissions`

- ## Constructor Details

  - ### CliFunction

    public CliFunction()

- ## Method Details

  - ### 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 Exception
    Throws:
      `Exception`