Class BuildLogLocalState


  • public class BuildLogLocalState
    extends Object
    A class that keeps a buffer of pending log messages, synchronizes it with internal build-log subsystem and keeps a local state of build-log view that can be used to evaluate external queries on buil-log state.
    • Method Detail

      • pushMessage

        public void pushMessage​(@NotNull
                                LogMessageData messageData)
        Adds a log message to the local buffer which will logged during the next synchronization.
        Parameters:
        messageData - message to be logged
      • pushMessage

        @Nullable
        public <T extends LogMessage> T pushMessage​(@NotNull
                                                    LogMessageData messageData,
                                                    @NotNull
                                                    Class<T> responseClass)
        Adds a log message to the local buffer and synchronize it right away. Note: this method is used by deprecated synchronous build-log api.
        Parameters:
        messageData - message to be logged.
        responseClass - expected type of the response.
        Returns:
        logging result.
      • isClosed

        public boolean isClosed()
      • getSizeEstimate

        public long getSizeEstimate()
      • getLastMessage

        @Nullable
        public LogMessage getLastMessage()
      • getLastBlockMessage

        @Nullable
        public BlockLogMessage getLastBlockMessage​(int flowId)
      • getFlowWithChildrenIds

        @NotNull
        public List<Integer> getFlowWithChildrenIds​(int flowId)
      • getParentFlow

        @Nullable
        public Integer getParentFlow​(int flowId)
      • flushIfNeeded

        public void flushIfNeeded()
      • flush

        public void flush()
      • hasLocallyBufferedMessages

        public boolean hasLocallyBufferedMessages()