java.lang.Object
org.apache.jackrabbit.oak.index.indexer.document.indexstore.IndexStoreUtils

public class IndexStoreUtils extends Object
  • Field Details

  • Constructor Details

    • IndexStoreUtils

      public IndexStoreUtils()
  • Method Details

    • compressionEnabled

      public static boolean compressionEnabled()
    • useLZ4

      public static boolean useLZ4()
    • compressionAlgorithm

      public static Compression compressionAlgorithm()
    • createReader

      public static BufferedReader createReader(File file, boolean compressionEnabled)
      This function by default uses GNU zip as compression algorithm for backward compatibility.
    • createReader

      public static BufferedReader createReader(File file, Compression algorithm)
    • createWriter

      public static BufferedWriter createWriter(File file, boolean compressionEnabled) throws IOException
      This function by default uses GNU zip as compression algorithm for backward compatibility.
      Throws:
      IOException
    • createWriter

      public static BufferedWriter createWriter(File file, Compression algorithm) throws IOException
      Throws:
      IOException
    • createOutputStream

      public static OutputStream createOutputStream(Path file, Compression algorithm) throws IOException
      Throws:
      IOException
    • sizeOf

      public static long sizeOf(List<File> sortedFiles)
    • getSortedStoreFileName

      public static String getSortedStoreFileName(Compression algorithm)
    • getMetadataFileName

      public static String getMetadataFileName(Compression algorithm)
    • getMetadataFile

      public static File getMetadataFile(File indexStoreFile, Compression algorithm)
    • validateFlatFileStoreFileName

      public static void validateFlatFileStoreFileName(File file, @NotNull @NotNull Compression algorithm)
      This method validates the compression suffix is in correspondence with compression algorithm.