Class BuildLogFiles


  • public final class BuildLogFiles
    extends Object
    • Method Detail

      • getMessagesFile

        @NotNull
        public static File getMessagesFile​(@NotNull
                                           String buildLogId)
        See Also:
        getBuildLogId(File)
      • getMessagesFileLength

        public static long getMessagesFileLength​(@NotNull
                                                 String buildLogId)
      • messagesFileExists

        public static boolean messagesFileExists​(@NotNull
                                                 String buildLogId)
      • getLogModifiedTime

        public static long getLogModifiedTime​(@NotNull
                                              String buildLogId)
      • getIndexFile

        @NotNull
        public static File getIndexFile​(@NotNull
                                        String buildLogId)
        Returns the index file by the provided build log id. It isn't checked that the index file exists!
      • getIndexFile

        @Deprecated
        @NotNull
        public static File getIndexFile​(@NotNull
                                        File messagesFile)
        Deprecated.
        It's preferred to use such methods that have dead with String 'buildLogId', not File.
        Returns the index file by the provided messages file. It isn't checked that the index file exists!
      • getFlowAwareIndexFile

        @NotNull
        public static File getFlowAwareIndexFile​(@NotNull
                                                 String buildLogId)
        Returns the flow aware index file by the provided build log id. It isn't checked that the index file exists!
      • getFlowAwareIndexTmpFile

        @NotNull
        public static File getFlowAwareIndexTmpFile​(@NotNull
                                                    String buildLogId)
      • getLinearToFlowAwareIndexMappingFile

        @NotNull
        public static File getLinearToFlowAwareIndexMappingFile​(@NotNull
                                                                String buildLogId)
        Returns the file that contains the mapping from regular index messages numbers to the same messages numbers in the flow-aware index. It isn't checked that the mapping file exists!
      • getFlowAwareIndexCannotBeCreatedMarkFile

        @NotNull
        public static File getFlowAwareIndexCannotBeCreatedMarkFile​(@NotNull
                                                                    String buildLogId)
      • getAnchorsFile

        @NotNull
        public static File getAnchorsFile​(@NotNull
                                          String buildLogId)
        Return a file that contains mapping between anchors and message ids.
        Parameters:
        buildLogId - build log identifier.
        Returns:
        anchors file.
      • getFilesToDownload

        @NotNull
        public static List<File> getFilesToDownload​(String buildLogId)
      • getBuildLogDir

        @NotNull
        public static File getBuildLogDir​(@NotNull
                                          String buildLogId)
      • parseBuildId

        @Nullable
        public static Long parseBuildId​(@NotNull
                                        File messagesOrIndexFile)
        Parameters:
        messagesOrIndexFile - messages or index file to check
        Returns:
        id of the build the supplied messages or index file belongs to.
        Since:
        7.1.3
      • getFormatVersion

        public static int getFormatVersion​(@NotNull
                                           String buildLogId)
        Returns the messages file version: from 0 (the oldest) to 6 (the newest).
        Returns:
        0 for oldest format, 1 for next version, in version 2 size of message chunk reduced from 64k to 16k, in version 5 we store blocks finish timestamps
      • findBuildLogId

        @NotNull
        public static String findBuildLogId​(@NotNull
                                            File artifactsDirectory,
                                            boolean buildExists)
      • getMessagesFile

        @NotNull
        public static File getMessagesFile​(@NotNull
                                           File buildArtifactsDir,
                                           @NotNull
                                           String extension)