Class TruncateTranslogCommand

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class TruncateTranslogCommand
    extends EnvironmentAwareCommand
    • Constructor Detail

      • TruncateTranslogCommand

        public TruncateTranslogCommand()
    • Method Detail

      • getParser

        public joptsimple.OptionParser getParser()
      • writeEmptyTranslog

        public static int writeEmptyTranslog​(java.nio.file.Path filename,
                                             java.lang.String translogUUID)
                                      throws java.io.IOException
        Write a translog containing the given translog UUID to the given location. Returns the number of bytes written.
        Throws:
        java.io.IOException
      • warnAboutDeletingFiles

        public 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
      • filesInDirectory

        public static java.util.Set<java.nio.file.Path> filesInDirectory​(java.nio.file.Path directory)
                                                                  throws java.io.IOException
        Return a Set of all files in a given directory
        Throws:
        java.io.IOException