Gemfire JavaDocs
Package org.apache.geode.management.cli
Class SingleGfshCommand
- java.lang.Object
-
- org.apache.geode.management.cli.GfshCommand
-
- org.apache.geode.management.cli.SingleGfshCommand
-
- All Implemented Interfaces:
org.springframework.shell.core.CommandMarker
@Experimental public abstract class SingleGfshCommand extends GfshCommand
Command class that extends this class can only have one single command method, * i.e only one method that is annotated with @CliCommand. this is also specific for commands that will need to update cluster configuration. Child classes are required to implement the "updateConfigForGroup" method.
-
-
Field Summary
-
Fields inherited from class org.apache.geode.management.cli.GfshCommand
EXPERIMENTAL
-
-
Constructor Summary
Constructors Constructor Description SingleGfshCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
affectsClusterConfiguration()
For those commands that could possibly change the cluster configuration, they need to override this method to return true.abstract boolean
updateConfigForGroup(java.lang.String group, CacheConfig config, java.lang.Object configObject)
Implement this method for updating the configuration of a given group the implementation should update the passed in config object with appropriate changes if for any reason config can't be updated.-
Methods inherited from class org.apache.geode.management.cli.GfshCommand
authorize, authorize, authorize, executeAndGetFunctionResult, executeFunction, executeFunction, executeFunctionAndGetFunctionResult, findAllLocators, findAllOtherLocators, findAnyMembersForRegion, findMember, findMembers, findMembersForRegion, findMembersIncludingLocators, getAllMembers, getAllNormalMembers, getCache, getClusterManagementService, getConfigurationPersistenceService, getManagementService, getMember, getMembers, getMembersFunctionExecutor, getMembersIncludingLocators, getNormalMembersWithSameOrNewerVersion, getSubject, isOnlineCommandAvailable, isSharedConfigurationRunning, poll, setCache
-
-
-
-
Method Detail
-
updateConfigForGroup
public abstract boolean updateConfigForGroup(java.lang.String group, CacheConfig config, java.lang.Object configObject)
Implement this method for updating the configuration of a given group the implementation should update the passed in config object with appropriate changes if for any reason config can't be updated. throw a RuntimeException stating the reason.- Parameters:
group
- the name of the group to update cluster config forconfig
- the configuration object, never nullconfigObject
- the return value of CommandResult.getConfigObject. CommandResult is the return value of your command method.- Returns:
- a boolean indicating whether a change to the cluster configuration was persisted.
-
affectsClusterConfiguration
public boolean affectsClusterConfiguration()
Description copied from class:GfshCommand
For those commands that could possibly change the cluster configuration, they need to override this method to return true.- Overrides:
affectsClusterConfiguration
in classGfshCommand
- Returns:
- whether the command may change the cluster configuration
-
-