Class Filename

java.lang.Object
org.iq80.leveldb.impl.Filename

public final class Filename extends Object
  • Constructor Details

    • Filename

      private Filename()
  • Method Details

    • logFileName

      public static String logFileName(long number)
      Return the name of the log file with the specified number.
    • tableFileName

      public static String tableFileName(long number)
      Return the name of the sstable with the specified number.
    • descriptorFileName

      public static String descriptorFileName(long number)
      Return the name of the descriptor file with the specified incarnation number.
    • currentFileName

      public static String currentFileName()
      Return the name of the current file.
    • lockFileName

      public static String lockFileName()
      Return the name of the lock file.
    • tempFileName

      public static String tempFileName(long number)
      Return the name of a temporary file with the specified number.
    • infoLogFileName

      public static String infoLogFileName()
      Return the name of the info log file.
    • oldInfoLogFileName

      public static String oldInfoLogFileName()
      Return the name of the old info log file.
    • parseFileName

      public static Filename.FileInfo parseFileName(File file)
      If filename is a leveldb file, store the type of the file in *type. The number encoded in the filename is stored in *number. If the filename was successfully parsed, returns true. Else return false.
    • setCurrentFile

      public static boolean setCurrentFile(File databaseDir, long descriptorNumber) throws IOException
      Make the CURRENT file point to the descriptor file with the specified number.
      Returns:
      true if successful; false otherwise
      Throws:
      IOException
    • writeStringToFileSync

      private static void writeStringToFileSync(String str, File file) throws IOException
      Throws:
      IOException
    • listFiles

      public static List<File> listFiles(File dir)
    • makeFileName

      private static String makeFileName(long number, String suffix)
    • removePrefix

      private static String removePrefix(String value, String prefix)
    • removeSuffix

      private static String removeSuffix(String value, String suffix)