Interface BuildLogWriterEx
-
- All Superinterfaces:
BuildLogWriter
,MessagesState
- All Known Subinterfaces:
BuildLogEx
- All Known Implementing Classes:
NoOpBuildLog
,ServerBuildLog
public interface BuildLogWriterEx extends BuildLogWriter
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.buildLog.MessagesState
MAX_LAST_MESSAGE_TEXT_SIZE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeBlockAsync(String blockName, String blockType, Date timestamp, String flowId, Consumer<BlockLogMessage> openBlockConsumer)
Marks an open block message as closed in the build log.void
flushIfNeeded()
Flushes all messages from local buffer to persister's buffer.boolean
hasLocallyBufferedMessages()
void
scheduleAfterFlushTask(String taskId, Runnable runnable)
Adds a task which should be executed right after the next build log flush.-
Methods inherited from interface jetbrains.buildServer.serverSide.buildLog.BuildLogWriter
close, flush
-
Methods inherited from interface jetbrains.buildServer.serverSide.buildLog.MessagesState
closeBlock, closeBlockAsync, closeProgressBlock, closeProgressBlockAsync, dropProgressText, error, error, getCurrentProgressText, getLastBlockMessage, getLastMessage, message, message, message, messageAsync, messageAsync, openBlock, openBlock, openBlock, openBlockAsync, openBlockAsync, openProgressBlock, openProgressBlock, openProgressBlockAsync, progressMessage, progressMessage, progressMessageAsync
-
-
-
-
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 ignoredrunnable
- 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 closeblockType
- type of the block to closetimestamp
- finish dateflowId
- block flow identifieropenBlockConsumer
- a consumer that is populated by an open block that was closed.- Since:
- 2023.4
-
-