Gemfire JavaDocs
Package org.apache.geode.management.cli
Interface Result
-
public interface Result
The result of processing a GemFire Command Line Interface (CLI) command string. A string representation of this Result can be iterated over using the methodshasNextLine()
,nextLine()
andresetToFirstLine()
. A Result may have one or more files as part of the command output and if so they can be saved to the file system usingsaveIncomingFiles(String)
. To check whether the result has a file in it usehasIncomingFiles()
.- Since:
- GemFire 7.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Result.Status
Indicates a Results status.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default java.lang.String
asString()
default boolean
failedToPersist()
Deprecated.since 1.10.Result.Status
getStatus()
Returns the status of a processed command.default boolean
hasIncomingFiles()
Deprecated.since 1.10.boolean
hasNextLine()
Returns whether the result has any more lines of information.java.lang.String
nextLine()
Returns the next line of information from the Result.void
resetToFirstLine()
Resets the pointer to the first line in the Result.default void
saveIncomingFiles(java.lang.String directory)
Deprecated.since 1.10.default void
setCommandPersisted(boolean commandPersisted)
Deprecated.since 1.10.
-
-
-
Method Detail
-
getStatus
Result.Status getStatus()
Returns the status of a processed command.- Returns:
- the status of a processed command
-
resetToFirstLine
void resetToFirstLine()
Resets the pointer to the first line in the Result.
-
hasNextLine
boolean hasNextLine()
Returns whether the result has any more lines of information.- Returns:
- True if there are more lines, false otherwise.
-
nextLine
java.lang.String nextLine()
Returns the next line of information from the Result.- Returns:
- the next line of information from the Result
- Throws:
java.lang.IndexOutOfBoundsException
- if this method is called more times than there are lines of information.
-
hasIncomingFiles
@Deprecated default boolean hasIncomingFiles()
Deprecated.since 1.10. file transfer in plugin commands is never supportedReturns whether this Result has a file as a part of the command output.- Returns:
- True if there is a file, false otherwise.
-
saveIncomingFiles
@Deprecated default void saveIncomingFiles(java.lang.String directory) throws java.io.IOException
Deprecated.since 1.10. file transfer in plugin commands is never supportedSave the file(s) from this Result.hasIncomingFiles()
should be used before calling this method to verify that the Result contains a file.- Parameters:
directory
- Directory to which the file(s) should be saved.- Throws:
java.io.IOException
- If an error occurs while saving the file.java.lang.RuntimeException
- If there is no file in the Result to save.
-
failedToPersist
@Deprecated default boolean failedToPersist()
Deprecated.since 1.10. This only affect the gfsh output line which is not api boundReturn whether the configuration changes due to command have been persisted to cluster configuration or not.- Returns:
- True if the command has failed to persist configuration changes , false otherwise.
-
setCommandPersisted
@Deprecated default void setCommandPersisted(boolean commandPersisted)
Deprecated.since 1.10. This only affect the gfsh output line which is not api boundSets whether the command changes have not been persisted to the cluster configuration- Parameters:
commandPersisted
- true if the command changes are persisted to the cluster configuration, false otherwise.
-
asString
default java.lang.String asString()
- Returns:
- the string representation of the result with the specified line separator.
-
-