java.io.Closeable
, java.lang.AutoCloseable
public class TruncateTranslogCommand extends EnvironmentAwareCommand
description, parser
Constructor | Description |
---|---|
TruncateTranslogCommand() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
execute(Terminal terminal,
joptsimple.OptionSet options,
Environment env) |
Execute the command with the initialized
Environment . |
static java.util.Set<java.nio.file.Path> |
filesInDirectory(java.nio.file.Path directory) |
Return a Set of all files in a given directory
|
joptsimple.OptionParser |
getParser() |
|
protected void |
printAdditionalHelp(Terminal terminal) |
|
static void |
warnAboutDeletingFiles(Terminal terminal,
java.util.Set<java.nio.file.Path> files,
boolean batchMode) |
Show a warning about deleting files, asking for a confirmation if
batchMode is false |
static int |
writeEmptyTranslog(java.nio.file.Path filename,
java.lang.String translogUUID) |
Write a translog containing the given translog UUID to the given location.
|
addShutdownHook, close, exit, main
createEnv, execute
public joptsimple.OptionParser getParser()
protected void printAdditionalHelp(Terminal terminal)
printAdditionalHelp
in class Command
protected void execute(Terminal terminal, joptsimple.OptionSet options, Environment env) throws java.lang.Exception
EnvironmentAwareCommand
Environment
.execute
in class EnvironmentAwareCommand
java.lang.Exception
public static int writeEmptyTranslog(java.nio.file.Path filename, java.lang.String translogUUID) throws java.io.IOException
java.io.IOException
public static void warnAboutDeletingFiles(Terminal terminal, java.util.Set<java.nio.file.Path> files, boolean batchMode)
batchMode
is falsepublic static java.util.Set<java.nio.file.Path> filesInDirectory(java.nio.file.Path directory) throws java.io.IOException
java.io.IOException