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.apache.geode.management.internal.cli.CommandMarker
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanFor those commands that could possibly change the cluster configuration, they need to override this method to return true.abstract booleanupdateConfigForGroup(String group, CacheConfig config, 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, hasCacheSet, isOnlineCommandAvailable, isSharedConfigurationRunning, poll, setCache
-
Constructor Details
-
SingleGfshCommand
public SingleGfshCommand()
-
-
Method Details
-
updateConfigForGroup
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:GfshCommandFor those commands that could possibly change the cluster configuration, they need to override this method to return true.- Overrides:
affectsClusterConfigurationin classGfshCommand- Returns:
- whether the command may change the cluster configuration
-