org.apache.geode.management.cli

## Class GfshCommand

- java.lang.Object
- - org.apache.geode.management.cli.GfshCommand

- All Implemented Interfaces:
    org.springframework.shell.core.CommandMarker
  Direct Known Subclasses:
    SingleGfshCommand

      @Experimental
      public abstract class GfshCommand
      extends java.lang.Object
      implements org.springframework.shell.core.CommandMarker

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `EXPERIMENTAL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GfshCommand()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `authorize(ResourcePermission.Resource resource, ResourcePermission.Operation operation, ResourcePermission.Target target)`
    `void` | `authorize(ResourcePermission.Resource resource, ResourcePermission.Operation operation, java.lang.String target)`
    `void` | `authorize(ResourcePermission.Resource resource, ResourcePermission.Operation operation, java.lang.String target, java.lang.String key)`
    `java.util.List<org.apache.geode.management.internal.cli.functions.CliFunctionResult>` | `executeAndGetFunctionResult(Function function, java.lang.Object args, java.util.Set<DistributedMember> targetMembers)`
    `ResultCollector<?,?>` | `executeFunction(Function function, java.lang.Object args, DistributedMember targetMember)`
    `ResultCollector<?,?>` | `executeFunction(Function function, java.lang.Object args, java.util.Set<DistributedMember> targetMembers)`
    `org.apache.geode.management.internal.cli.functions.CliFunctionResult` | `executeFunctionAndGetFunctionResult(Function function, java.lang.Object args, DistributedMember targetMember)`
    `java.util.Set<DistributedMember>` | `findAnyMembersForRegion(java.lang.String regionPath)`
    `DistributedMember` | `findMember(java.lang.String memberName)` this will return the member found or null if no member with that name
    `java.util.Set<DistributedMember>` | `findMembers(java.lang.String[] groups, java.lang.String[] members)` if no members matches these names, an empty set would return, this does not include locators
    `java.util.Set<DistributedMember>` | `findMembersForRegion(java.lang.String regionPath)`
    `java.util.Set<DistributedMember>` | `findMembersIncludingLocators(java.lang.String[] groups, java.lang.String[] members)` if no members matches these names, an empty set would return
    `java.util.Set<DistributedMember>` | `getAllMembers()` Gets all members in the GemFire distributed system/cache, including locators
    `java.util.Set<DistributedMember>` | `getAllNormalMembers()` Get All members, excluding locators
    `Cache` | `getCache()`
    `ConfigurationPersistenceService` | `getConfigurationPersistenceService()`
    `DistributedMember` | `getMember(java.lang.String memberName)` this either returns a non-null member or throw an exception if member is not found.
    `java.util.Set<DistributedMember>` | `getMembers(java.lang.String[] groups, java.lang.String[] members)` if no members matches these names, a UserErrorException will be thrown
    `Execution` | `getMembersFunctionExecutor(java.util.Set<DistributedMember> members)`
    `java.util.Set<DistributedMember>` | `getMembersIncludingLocators(java.lang.String[] groups, java.lang.String[] members)` if no members matches these names, a UserErrorException will be thrown
    `java.util.Set<DistributedMember>` | `getNormalMembersWithSameOrNewerVersion(org.apache.geode.internal.Version version)` Get All members >= a specific version, excluding locators
    `org.apache.shiro.subject.Subject` | `getSubject()`
    `boolean` | `isConnectedAndReady()`
    `boolean` | `isOnlineCommandAvailable()`
    `boolean` | `isSharedConfigurationRunning()`
    `void` | `setCache(Cache cache)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EXPERIMENTAL

          public static final java.lang.String EXPERIMENTAL

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### GfshCommand

          public GfshCommand()

  - ### Method Detail

    - #### isConnectedAndReady

          public boolean isConnectedAndReady()

    - #### isOnlineCommandAvailable

          public boolean isOnlineCommandAvailable()

    - #### authorize

          public void authorize(ResourcePermission.Resource resource,
                                ResourcePermission.Operation operation,
                                ResourcePermission.Target target)

    - #### authorize

          public void authorize(ResourcePermission.Resource resource,
                                ResourcePermission.Operation operation,
                                java.lang.String target)

    - #### authorize

          public void authorize(ResourcePermission.Resource resource,
                                ResourcePermission.Operation operation,
                                java.lang.String target,
                                java.lang.String key)

    - #### getCache

          public Cache getCache()

    - #### getConfigurationPersistenceService

          public ConfigurationPersistenceService getConfigurationPersistenceService()

    - #### setCache

          public void setCache(Cache cache)

    - #### isSharedConfigurationRunning

          public boolean isSharedConfigurationRunning()

    - #### getSubject

          public org.apache.shiro.subject.Subject getSubject()

    - #### getMember

          public DistributedMember getMember(java.lang.String memberName)

      this either returns a non-null member or throw an exception if member is not found.

    - #### findMember

          public DistributedMember findMember(java.lang.String memberName)

      this will return the member found or null if no member with that name

    - #### getAllMembers

          public java.util.Set<DistributedMember> getAllMembers()

      Gets all members in the GemFire distributed system/cache, including locators

    - #### getAllNormalMembers

          public java.util.Set<DistributedMember> getAllNormalMembers()

      Get All members, excluding locators

    - #### getNormalMembersWithSameOrNewerVersion

          public java.util.Set<DistributedMember> getNormalMembersWithSameOrNewerVersion(org.apache.geode.internal.Version version)

      Get All members >= a specific version, excluding locators

    - #### getMembersFunctionExecutor

          public Execution getMembersFunctionExecutor(java.util.Set<DistributedMember> members)

    - #### findMembers

          public java.util.Set<DistributedMember> findMembers(java.lang.String[] groups,
                                                              java.lang.String[] members)

      if no members matches these names, an empty set would return, this does not include locators

    - #### getMembers

          public java.util.Set<DistributedMember> getMembers(java.lang.String[] groups,
                                                             java.lang.String[] members)

      if no members matches these names, a UserErrorException will be thrown

    - #### findMembersIncludingLocators

          public java.util.Set<DistributedMember> findMembersIncludingLocators(java.lang.String[] groups,
                                                                               java.lang.String[] members)

      if no members matches these names, an empty set would return

    - #### getMembersIncludingLocators

          public java.util.Set<DistributedMember> getMembersIncludingLocators(java.lang.String[] groups,
                                                                              java.lang.String[] members)

      if no members matches these names, a UserErrorException will be thrown

    - #### findMembersForRegion

          public java.util.Set<DistributedMember> findMembersForRegion(java.lang.String regionPath)

    - #### findAnyMembersForRegion

          public java.util.Set<DistributedMember> findAnyMembersForRegion(java.lang.String regionPath)

    - #### executeFunction

          public ResultCollector<?,?> executeFunction(Function function,
                                                      java.lang.Object args,
                                                      java.util.Set<DistributedMember> targetMembers)

    - #### executeFunction

          public ResultCollector<?,?> executeFunction(Function function,
                                                      java.lang.Object args,
                                                      DistributedMember targetMember)

    - #### executeFunctionAndGetFunctionResult

          public org.apache.geode.management.internal.cli.functions.CliFunctionResult executeFunctionAndGetFunctionResult(Function function,
                                                                                                                          java.lang.Object args,
                                                                                                                          DistributedMember targetMember)

    - #### executeAndGetFunctionResult

          public java.util.List<org.apache.geode.management.internal.cli.functions.CliFunctionResult> executeAndGetFunctionResult(Function function,
                                                                                                                                  java.lang.Object args,
                                                                                                                                  java.util.Set<DistributedMember> targetMembers)