Package org.iq80.leveldb.impl
Class Filename
java.lang.Object
org.iq80.leveldb.impl.Filename
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn the name of the current file.static StringdescriptorFileName(long number) Return the name of the descriptor file with the specified incarnation number.static StringReturn the name of the info log file.static StringReturn the name of the lock file.static StringlogFileName(long number) Return the name of the log file with the specified number.private static StringmakeFileName(long number, String suffix) static StringReturn the name of the old info log file.static Filename.FileInfoparseFileName(File file) If filename is a leveldb file, store the type of the file in *type.private static StringremovePrefix(String value, String prefix) private static StringremoveSuffix(String value, String suffix) static booleansetCurrentFile(File databaseDir, long descriptorNumber) Make the CURRENT file point to the descriptor file with the specified number.static StringtableFileName(long number) Return the name of the sstable with the specified number.static StringtempFileName(long number) Return the name of a temporary file with the specified number.private static voidwriteStringToFileSync(String str, File file)
-
Constructor Details
-
Filename
private Filename()
-
-
Method Details
-
logFileName
Return the name of the log file with the specified number. -
tableFileName
Return the name of the sstable with the specified number. -
descriptorFileName
Return the name of the descriptor file with the specified incarnation number. -
currentFileName
Return the name of the current file. -
lockFileName
Return the name of the lock file. -
tempFileName
Return the name of a temporary file with the specified number. -
infoLogFileName
Return the name of the info log file. -
oldInfoLogFileName
Return the name of the old info log file. -
parseFileName
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
Make the CURRENT file point to the descriptor file with the specified number.- Returns:
- true if successful; false otherwise
- Throws:
IOException
-
writeStringToFileSync
- Throws:
IOException
-
listFiles
-
makeFileName
-
removePrefix
-
removeSuffix
-