public interface Result
hasNextLine()
, nextLine()
and resetToFirstLine()
.
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 using saveIncomingFiles(String)
. To check whether the result has a file
in it use hasIncomingFiles()
.Modifier and Type | Interface and Description |
---|---|
static class |
Result.Status
Indicates a Results status.
|
Modifier and Type | Method and Description |
---|---|
default String |
asString() |
default boolean |
failedToPersist()
Deprecated.
since 1.10. This only affect the gfsh output line which is not api bound
|
Result.Status |
getStatus()
Returns the status of a processed command.
|
default boolean |
hasIncomingFiles()
Deprecated.
since 1.10. file transfer in plugin commands is never supported
|
boolean |
hasNextLine()
Returns whether the result has any more lines of information.
|
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(String directory)
Deprecated.
since 1.10. file transfer in plugin commands is never supported
|
default void |
setCommandPersisted(boolean commandPersisted)
Deprecated.
since 1.10. This only affect the gfsh output line which is not api bound
|
Result.Status getStatus()
void resetToFirstLine()
boolean hasNextLine()
String nextLine()
IndexOutOfBoundsException
- if this method is called more times than there are lines of
information.@Deprecated default boolean hasIncomingFiles()
@Deprecated default void saveIncomingFiles(String directory) throws IOException
hasIncomingFiles()
should be used before calling
this method to verify that the Result contains a file.directory
- Directory to which the file(s) should be saved.IOException
- If an error occurs while saving the file.RuntimeException
- If there is no file in the Result to save.@Deprecated default boolean failedToPersist()
@Deprecated default void setCommandPersisted(boolean commandPersisted)
commandPersisted
- true if the command changes are persisted to the cluster configuration,
false otherwise.default String asString()