Interface BuildLogWriterEx

    • Method Detail

      • flushIfNeeded

        void flushIfNeeded()
        Flushes all messages from local buffer to persister's buffer. Flushes persister's buffer if its size or exceeds some threshold, or it was not flushed for some time period.
      • scheduleAfterFlushTask

        void scheduleAfterFlushTask​(@NotNull
                                    String taskId,
                                    @NotNull
                                    Runnable runnable)
        Adds a task which should be executed right after the next build log flush.
        Parameters:
        taskId - unique (in for a build) task id, subsequent attempts to add a task with the same id are ignored
        runnable - task
      • hasLocallyBufferedMessages

        boolean hasLocallyBufferedMessages()
      • closeBlockAsync

        void closeBlockAsync​(@NotNull
                             String blockName,
                             @NotNull
                             String blockType,
                             @NotNull
                             Date timestamp,
                             @NotNull
                             String flowId,
                             @NotNull
                             Consumer<BlockLogMessage> openBlockConsumer)
        Marks an open block message as closed in the build log. The method does not write to the build log immediately, instead it puts the message into a buffer which will be flushed later. But any messages that are in the buffer when this method is called are going to be flushed so that corresponding open bLock could be correctly determined.
        Parameters:
        blockName - name of the block to close
        blockType - type of the block to close
        timestamp - finish date
        flowId - block flow identifier
        openBlockConsumer - a consumer that is populated by an open block that was closed.
        Since:
        2023.4