Class NoOpBuildLog
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.NoOpBuildLog
-
- All Implemented Interfaces:
BuildLog
,BuildLogEx
,BuildLogReader
,BuildLogReaderEx
,BuildLogWriter
,BuildLogWriterEx
,FlowHierarchy
,MessagesState
public class NoOpBuildLog extends Object implements BuildLogEx
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.buildLog.MessagesState
MAX_LAST_MESSAGE_TEXT_SIZE
-
-
Constructor Summary
Constructors Constructor Description NoOpBuildLog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
buildLogExists()
void
close()
Closes this build log.BlockLogMessage
closeBlock(String blockName, String blockType, Date timestamp, String flowId)
Closes last opened block with specified name and type and returns it.void
closeBlockAsync(String blockName, String blockType, Date timestamp, String flowId)
Marks an open block message as closed in the build log.void
closeBlockAsync(String blockName, String blockType, Date timestamp, String flowId, Consumer<BlockLogMessage> openBlockConsumer)
Marks an open block message as closed in the build log.BlockLogMessage
closeProgressBlock(Date timestamp, String flowId)
Closes last progress block and returns it.void
closeProgressBlockAsync(Date timestamp, String flowId)
Marks an open progress block message as closed in the build log.TestOutput
collectStacktraceTestOutput(int testId)
TestOutput
collectTestOutput(int testId)
boolean
containsMessageWithHint(String renderingHint)
LogMessageIterator
createIterator()
LogMessageIterator
createIterator(int startIndex, boolean strictFlowOpening)
LogMessageIterator
createIterator(int startIndex, LogView logView)
LogMessageIterator
createReversedIterator(int endIndex, LogView logView)
void
dispose()
void
dropProgressText(String flowId)
Drops current progress text.LogMessage
error(String type, String message, Date timestamp, String renderingHint, String flowId, Collection<String> tags)
Creates and returns a new log message, which reports about an error.void
flowFinished(String flow)
This flow is finished and can be releasedint
flowIdToInt(String flowId)
void
flowStarted(String flow, String parentFlow)
This flow is startedvoid
flush()
Flushes messages from this build log to disk.void
flushIfNeeded()
Flushes all messages from local buffer to persister's buffer.TimeZone
getAgentTimeZone()
String
getBuildLogId()
The unique id of the build log that allows to find the build log in the storage.String
getCurrentPath()
String
getCurrentProgressText()
List<LogMessage>
getDefaultFilteredMessages()
Returns messages accepted by default filter.List<LogMessage>
getErrorMessages()
Returns messages accepted byProblemsFilter
.List<LogMessage>
getFilteredMessages(LogMessageFilter filter)
Returns list of messages accepted by specified filter.InternalErrorMessageProcessor.LogErrorData
getFirstInternalError()
LinkedHashMap<LogMessageInfo,Integer>
getFirstLevelOpenCloseBlocksToIndex(LogView logView)
int
getFlowAwareIndex(int linearIndex)
Map<Integer,FlowsMessageProcessor.FlowInfo>
getFlowIndex()
Integer
getFlowStartIndex(int flowId)
List<Integer>
getFlowWithChildren(String flowId)
Return list of child flows for given flow id, plus flowId itselfint
getFormatVersion()
Map<LogMessageInfo,Integer>
getHierarchyAndThresholdMessages(int thresholdMessageId, LogView logView)
BlockLogMessage
getLastBlockMessage(String flowId)
Returns last block message inside specified flowInteger
getLastIndexSatisfyingKinds(int startIndex, Set<LogMessageKind> kinds, LogView logView)
LogMessage
getLastMessage()
Returns last message.Date
getLastMessageTimestamp()
Returns timestamp of the last logged message.Iterator<LogMessageInfo>
getLowLevelMessagesIterator(int startIndex)
Returns iterator over low level build log records.File
getMainLogFile()
Primary log file which contains messages of the log.LogMessageInfo
getMessageInfo(int messageIndex)
List<LogMessage>
getMessages()
Returns all messages as list in order of their appearance.Iterator<LogMessage>
getMessagesIterator()
Returns iterator over all log messages.int
getNumberOfMessages()
Integer
getParentFlow(int flowId)
Return parent flow ID for given flow IDList<BlockDescriptor>
getPendingOpenBlocks(Integer flowId, String blockType)
ProgressInfo
getProgressInfo()
Returns progress information for the current build.String
getSizeEstimate()
Returns a human-readable string containing approx.long
getSizeEstimateAsLong()
Returns an approx.int
getStartedStepsNumber()
Iterator<LogMessage>
getVerboseIterator()
Iterator<LogMessage>
getVerboseIterator(LogView logView)
boolean
hasLocallyBufferedMessages()
boolean
hasMessagesAvailable()
Returnstrue
if the log has at least one message.boolean
isClosed()
Returnstrue
if this build log was closed.boolean
isFlowAwareIndexAvailable()
Returnstrue
if the flow-aware index is available for the build (might trigger index costruction if it is not available yet).LogMessage
message(String text, Status status, Date timestamp, String renderingHint, String flowId, Collection<String> tags)
Adds message and returns itLogMessage
message(String text, Status status, MessageAttrs attrs)
Adds message and returns itvoid
messageAsync(String text, Status status, MessageAttrs attrs)
Logs a message to the build log.void
messageAsync(String text, Status status, MessageAttrs attrs, Consumer<Integer> anchorConsumer)
Logs a message to the build log.BlockLogMessage
openBlock(String blockName, String blockType, Date timestamp, String renderingHint, String flowId, Collection<String> tags)
Opens new block.BlockLogMessage
openBlock(String blockName, String blockType, MessageAttrs attrs)
Opens new block.void
openBlockAsync(String blockName, String blockType, MessageAttrs attrs)
Logs an open block message to the build log.void
openBlockAsync(String blockName, String blockType, MessageAttrs attrs, Consumer<Integer> anchorConsumer)
Logs an open block message to the build log.BlockLogMessage
openProgressBlock(String blockName, Date timestamp, String flowId, Collection<String> tags)
void
openProgressBlockAsync(String blockName, MessageAttrs attrs)
Logs an open progress block message to the build log.LogMessage
progressMessage(String message, Date timestamp, String flowId, Collection<String> tags)
void
progressMessageAsync(String message, MessageAttrs attrs)
Logs a progress message to the build log.void
refreshNextMessageIndex()
This method exists as a workaround for multi node setup when several nodes can write messages to build log.int
resolveAnchor(int index, LogView logView)
Map<Integer,Integer>
resolveAnchors(Set<Integer> indexes)
void
scheduleAfterFlushTask(String taskId, Runnable runnable)
Adds a task which should be executed right after the next build log flush.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.buildLog.MessagesState
error, message, openBlock, openProgressBlock, progressMessage
-
-
-
-
Method Detail
-
getLowLevelMessagesIterator
@NotNull public Iterator<LogMessageInfo> getLowLevelMessagesIterator(int startIndex)
Description copied from interface:BuildLogReaderEx
Returns iterator over low level build log records.- Specified by:
getLowLevelMessagesIterator
in interfaceBuildLogReaderEx
-
getPendingOpenBlocks
@NotNull public List<BlockDescriptor> getPendingOpenBlocks(@Nullable Integer flowId, @Nullable String blockType)
- Specified by:
getPendingOpenBlocks
in interfaceBuildLogReaderEx
- Parameters:
flowId
- ifnull
blocks from any flow are returned, if notnull
, only blocks in the specified flow are returnedblockType
- ifnull
all blocks are returned, if notnull
, only blocks of the specified type are returned- Returns:
- all not yet closed blocks in all flows (returned blocks are order by their opening time - oldest at the beginning, newest at the end).
-
getNumberOfMessages
public int getNumberOfMessages()
- Specified by:
getNumberOfMessages
in interfaceBuildLogReaderEx
- Returns:
- total number of logged messages in this build log
-
flushIfNeeded
public void flushIfNeeded()
Description copied from interface:BuildLogWriterEx
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.- Specified by:
flushIfNeeded
in interfaceBuildLogWriterEx
-
scheduleAfterFlushTask
public void scheduleAfterFlushTask(@NotNull String taskId, @NotNull Runnable runnable)
Description copied from interface:BuildLogWriterEx
Adds a task which should be executed right after the next build log flush.- Specified by:
scheduleAfterFlushTask
in interfaceBuildLogWriterEx
- Parameters:
taskId
- unique (in for a build) task id, subsequent attempts to add a task with the same id are ignoredrunnable
- task
-
hasLocallyBufferedMessages
public boolean hasLocallyBufferedMessages()
- Specified by:
hasLocallyBufferedMessages
in interfaceBuildLogWriterEx
-
flush
public void flush()
Description copied from interface:BuildLogWriter
Flushes messages from this build log to disk.- Specified by:
flush
in interfaceBuildLogWriter
-
close
public void close()
Description copied from interface:BuildLogWriter
Closes this build log. Subsequent attempts to call addMessage will result in an exception.- Specified by:
close
in interfaceBuildLogWriter
-
flowStarted
public void flowStarted(@NotNull String flow, @NotNull String parentFlow)
Description copied from interface:FlowHierarchy
This flow is started- Specified by:
flowStarted
in interfaceFlowHierarchy
- Parameters:
flow
- flow idparentFlow
- parent flow id
-
flowFinished
public void flowFinished(@NotNull String flow)
Description copied from interface:FlowHierarchy
This flow is finished and can be released- Specified by:
flowFinished
in interfaceFlowHierarchy
- Parameters:
flow
- flow id
-
getFlowWithChildren
@NotNull public List<Integer> getFlowWithChildren(@NotNull String flowId)
Description copied from interface:FlowHierarchy
Return list of child flows for given flow id, plus flowId itself- Specified by:
getFlowWithChildren
in interfaceFlowHierarchy
- Parameters:
flowId
- parent of the child flows to be returned. the param is returned with results of the call.- Returns:
- A list of flowIds in topological order.
-
getParentFlow
@Nullable public Integer getParentFlow(int flowId)
Description copied from interface:FlowHierarchy
Return parent flow ID for given flow ID- Specified by:
getParentFlow
in interfaceFlowHierarchy
- Parameters:
flowId
- child flow ID- Returns:
- see above
-
flowIdToInt
public int flowIdToInt(@NotNull String flowId)
- Specified by:
flowIdToInt
in interfaceFlowHierarchy
-
getSizeEstimate
@NotNull public String getSizeEstimate()
Description copied from interface:BuildLog
Returns a human-readable string containing approx. build log size.- Specified by:
getSizeEstimate
in interfaceBuildLog
- Returns:
- approx. build log size as string
-
getSizeEstimateAsLong
public long getSizeEstimateAsLong()
Description copied from interface:BuildLog
Returns an approx. build log size.- Specified by:
getSizeEstimateAsLong
in interfaceBuildLog
- Returns:
- approx. build log size as long
-
getMainLogFile
@NotNull public File getMainLogFile()
Description copied from interface:BuildLog
Primary log file which contains messages of the log. This file MUST NOT be used to read or write messages, but only as a reference on where the log is stored. The build log also may have one or more index files, stored nearby this messages log file.- Specified by:
getMainLogFile
in interfaceBuildLog
-
getBuildLogId
@NotNull public String getBuildLogId()
Description copied from interface:BuildLogEx
The unique id of the build log that allows to find the build log in the storage. For now this id is the path to the main messages file, but this implementation may be changed at any time.- Specified by:
getBuildLogId
in interfaceBuildLogEx
-
openBlock
public BlockLogMessage openBlock(@NotNull String blockName, @NotNull String blockType, @Nullable Date timestamp, @Nullable String renderingHint, @Nullable String flowId, @Nullable Collection<String> tags)
Description copied from interface:MessagesState
Opens new block.- Specified by:
openBlock
in interfaceMessagesState
- Parameters:
blockName
- name of the blockblockType
- type of the blocktimestamp
- timestamprenderingHint
- hint for rendering this blockflowId
- block flow identifiertags
- block tags which may be used to pass additional data- Returns:
- block message
-
openBlock
public BlockLogMessage openBlock(@NotNull String blockName, @NotNull String blockType, @NotNull MessageAttrs attrs)
Description copied from interface:MessagesState
Opens new block.- Specified by:
openBlock
in interfaceMessagesState
- Parameters:
blockName
- name of the blockblockType
- type of the blockattrs
- message attributes- Returns:
- block message
-
openBlockAsync
public void openBlockAsync(@NotNull String blockName, @NotNull String blockType, @NotNull MessageAttrs attrs)
Description copied from interface:MessagesState
Logs an open block message to 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.- Specified by:
openBlockAsync
in interfaceMessagesState
- Parameters:
blockName
- name of the blockblockType
- type of the blockattrs
- message attributes
-
openBlockAsync
public void openBlockAsync(@NotNull String blockName, @NotNull String blockType, @NotNull MessageAttrs attrs, @NotNull Consumer<Integer> anchorConsumer)
Description copied from interface:MessagesState
Logs an open block message to 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.- Specified by:
openBlockAsync
in interfaceMessagesState
- Parameters:
blockName
- name of the blockblockType
- type of the blockattrs
- message attributesanchorConsumer
- a consumer that is populated by message id that can later be used to access the message
-
closeBlock
@Nullable public BlockLogMessage closeBlock(@NotNull String blockName, @NotNull String blockType, @NotNull Date timestamp, @NotNull String flowId)
Description copied from interface:MessagesState
Closes last opened block with specified name and type and returns it.- Specified by:
closeBlock
in interfaceMessagesState
- Parameters:
blockName
- name of the block to closeblockType
- type of the block to closetimestamp
- finish dateflowId
- block flow identifier
-
closeBlockAsync
public void closeBlockAsync(@NotNull String blockName, @NotNull String blockType, @NotNull Date timestamp, @NotNull String flowId)
Description copied from interface:MessagesState
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.- Specified by:
closeBlockAsync
in interfaceMessagesState
- Parameters:
blockName
- name of the block to closeblockType
- type of the block to closetimestamp
- finish dateflowId
- block flow identifier
-
closeBlockAsync
public void closeBlockAsync(@NotNull String blockName, @NotNull String blockType, @NotNull Date timestamp, @NotNull String flowId, @NotNull Consumer<BlockLogMessage> openBlockConsumer)
Description copied from interface:BuildLogWriterEx
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.- Specified by:
closeBlockAsync
in interfaceBuildLogWriterEx
- 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.
-
message
public LogMessage message(@Nullable String text, @Nullable Status status, @Nullable Date timestamp, @Nullable String renderingHint, @Nullable String flowId, @Nullable Collection<String> tags)
Description copied from interface:MessagesState
Adds message and returns it- Specified by:
message
in interfaceMessagesState
- Parameters:
text
- message textstatus
- message statustimestamp
- timestamprenderingHint
- hint for rendering this messageflowId
- message flow identifiertags
- message tags which may be used to pass additional data- Returns:
- message
-
message
public LogMessage message(@Nullable String text, @Nullable Status status, @NotNull MessageAttrs attrs)
Description copied from interface:MessagesState
Adds message and returns it- Specified by:
message
in interfaceMessagesState
- Parameters:
text
- message textstatus
- message statusattrs
- message attributes- Returns:
- message
-
messageAsync
public void messageAsync(@Nullable String text, @Nullable Status status, @NotNull MessageAttrs attrs)
Description copied from interface:MessagesState
Logs a message to 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.- Specified by:
messageAsync
in interfaceMessagesState
- Parameters:
text
- message textstatus
- message statusattrs
- message attributes
-
messageAsync
public void messageAsync(@Nullable String text, @Nullable Status status, @NotNull MessageAttrs attrs, @NotNull Consumer<Integer> anchorConsumer)
Description copied from interface:MessagesState
Logs a message to 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.- Specified by:
messageAsync
in interfaceMessagesState
- Parameters:
text
- message textstatus
- message statusattrs
- message attributesanchorConsumer
- a consumer that is populated by message id that can later be used to access the message
-
error
public LogMessage error(@Nullable String type, @Nullable String message, @Nullable Date timestamp, @Nullable String renderingHint, @Nullable String flowId, @Nullable Collection<String> tags)
Description copied from interface:MessagesState
Creates and returns a new log message, which reports about an error.- Specified by:
error
in interfaceMessagesState
- Parameters:
type
- the error typemessage
- the error messagetimestamp
- timestamprenderingHint
- rendering hintflowId
- message flow identifiertags
- message tags which may be used to pass additional data- Returns:
- corresponding log message
-
getLastBlockMessage
public BlockLogMessage getLastBlockMessage(@NotNull String flowId)
Description copied from interface:MessagesState
Returns last block message inside specified flow- Specified by:
getLastBlockMessage
in interfaceMessagesState
- Parameters:
flowId
- flow id- Returns:
- last opened block or null if no such flow or no blocks are open
-
getLastMessage
@Nullable public LogMessage getLastMessage()
Description copied from interface:MessagesState
Returns last message. Same asMessagesState.getLastBlockMessage(String)
if last message is block message. Will return no more thanMessagesState.MAX_LAST_MESSAGE_TEXT_SIZE
chars of original text- Specified by:
getLastMessage
in interfaceMessagesState
- Returns:
- last message
-
openProgressBlock
public BlockLogMessage openProgressBlock(@NotNull String blockName, @Nullable Date timestamp, @NotNull String flowId, @Nullable Collection<String> tags)
- Specified by:
openProgressBlock
in interfaceMessagesState
-
openProgressBlockAsync
public void openProgressBlockAsync(@NotNull String blockName, @NotNull MessageAttrs attrs)
Description copied from interface:MessagesState
Logs an open progress block message to 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.- Specified by:
openProgressBlockAsync
in interfaceMessagesState
- Parameters:
blockName
- progress block nameattrs
- progress block attributes
-
closeProgressBlock
@Nullable public BlockLogMessage closeProgressBlock(@NotNull Date timestamp, @NotNull String flowId)
Description copied from interface:MessagesState
Closes last progress block and returns it.- Specified by:
closeProgressBlock
in interfaceMessagesState
- Parameters:
timestamp
- finish dateflowId
- flow id- Returns:
- closed progress block or null
-
closeProgressBlockAsync
public void closeProgressBlockAsync(@NotNull Date timestamp, @NotNull String flowId)
Description copied from interface:MessagesState
Marks an open progress 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.- Specified by:
closeProgressBlockAsync
in interfaceMessagesState
- Parameters:
timestamp
- finish dateflowId
- block flow identifier
-
progressMessage
public LogMessage progressMessage(@NotNull String message, @Nullable Date timestamp, @NotNull String flowId, @Nullable Collection<String> tags)
- Specified by:
progressMessage
in interfaceMessagesState
-
progressMessageAsync
public void progressMessageAsync(@NotNull String message, @NotNull MessageAttrs attrs)
Description copied from interface:MessagesState
Logs a progress message to 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.- Specified by:
progressMessageAsync
in interfaceMessagesState
- Parameters:
message
- progress message text (empty parameter will be perceived as "drop progress text command" - current progress text for specified flow will be cleared)attrs
- progress message attributes
-
dropProgressText
public void dropProgressText(@NotNull String flowId)
Description copied from interface:MessagesState
Drops current progress text.- Specified by:
dropProgressText
in interfaceMessagesState
- Parameters:
flowId
- flow id
-
getCurrentProgressText
@Nullable public String getCurrentProgressText()
- Specified by:
getCurrentProgressText
in interfaceMessagesState
- Returns:
- current progress text, i.e. text defined via progress messages; returns null if there is no progress text defined
-
getMessagesIterator
@NotNull public Iterator<LogMessage> getMessagesIterator()
Description copied from interface:BuildLogReader
Returns iterator over all log messages. Build log messages form a tree which is iterated as follows: iterator walks down the tree until it meets a leaf, then it seeks whether parent of the leaf has siblings and iterate over them, moving down to their children if needed and so on. In other words this iterator iterates over all messages in the tree in order of their appearance. The iterator is filtered by default, i.e. it doesn't include internal messages. Each log message has parent, so while iterating down the tree it is possible to go up to the topmost parent. You can obtain level in the tree for each message with help ofLogMessage.getLevel()
method.- Specified by:
getMessagesIterator
in interfaceBuildLogReader
- Returns:
- filtered iterator by log messages.
- See Also:
LogMessage.isInternal()
-
getVerboseIterator
@NotNull public Iterator<LogMessage> getVerboseIterator()
- Specified by:
getVerboseIterator
in interfaceBuildLogReader
- Returns:
- message iterator without any filtering, i.e. includes all messages in the build log
- See Also:
BuildLogReader.getMessagesIterator()
-
getVerboseIterator
@NotNull public Iterator<LogMessage> getVerboseIterator(@NotNull LogView logView) throws FlowAwareIndexAccessException
- Specified by:
getVerboseIterator
in interfaceBuildLogReaderEx
- Parameters:
logView
- linear or flowAware log view- Returns:
- message iterator based on provided view mode without any filtering, i.e. includes all messages in the build log
- Throws:
FlowAwareIndexAccessException
-
hasMessagesAvailable
public boolean hasMessagesAvailable()
Description copied from interface:BuildLogReaderEx
Returnstrue
if the log has at least one message.- Specified by:
hasMessagesAvailable
in interfaceBuildLogReaderEx
-
getMessages
@NotNull public List<LogMessage> getMessages()
Description copied from interface:BuildLogReader
Returns all messages as list in order of their appearance.- Specified by:
getMessages
in interfaceBuildLogReader
- Returns:
- all messages as list in order of their appearance.
-
getDefaultFilteredMessages
@NotNull public List<LogMessage> getDefaultFilteredMessages()
Description copied from interface:BuildLogReader
Returns messages accepted by default filter. SeeDefaultLogMessageFilter
.- Specified by:
getDefaultFilteredMessages
in interfaceBuildLogReader
- Returns:
- messages accepted by default filter
-
getErrorMessages
@NotNull public List<LogMessage> getErrorMessages()
Description copied from interface:BuildLogReader
Returns messages accepted byProblemsFilter
.- Specified by:
getErrorMessages
in interfaceBuildLogReader
- Returns:
- messages accepted by
ProblemsFilter
.
-
getFilteredMessages
@NotNull public List<LogMessage> getFilteredMessages(@NotNull LogMessageFilter filter)
Description copied from interface:BuildLogReader
Returns list of messages accepted by specified filter.- Specified by:
getFilteredMessages
in interfaceBuildLogReader
- Parameters:
filter
- filter for messages- Returns:
- messages accepted by filter.
-
isClosed
public boolean isClosed()
Description copied from interface:BuildLogReader
Returnstrue
if this build log was closed.It's important that if the build log was closed on another node, the current one may not know about it!
- Specified by:
isClosed
in interfaceBuildLogReader
-
getLastMessageTimestamp
@Nullable public Date getLastMessageTimestamp()
Description copied from interface:BuildLogReader
Returns timestamp of the last logged message.- Specified by:
getLastMessageTimestamp
in interfaceBuildLogReader
- Returns:
- timestamp or null if there were no messages yet.
-
getCurrentPath
@NotNull public String getCurrentPath()
- Specified by:
getCurrentPath
in interfaceBuildLogReader
- Returns:
- current path - concatenation of text from the last message and names of all the parent blocks
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceBuildLogEx
-
refreshNextMessageIndex
public void refreshNextMessageIndex()
Description copied from interface:BuildLogEx
This method exists as a workaround for multi node setup when several nodes can write messages to build log. In this case index of the next message can become obsolete and if this index is required, then this refresh method should be called before logging a message to the build log.- Specified by:
refreshNextMessageIndex
in interfaceBuildLogEx
-
isFlowAwareIndexAvailable
public boolean isFlowAwareIndexAvailable()
Description copied from interface:BuildLogEx
Returnstrue
if the flow-aware index is available for the build (might trigger index costruction if it is not available yet).- Specified by:
isFlowAwareIndexAvailable
in interfaceBuildLogEx
-
getProgressInfo
@NotNull public ProgressInfo getProgressInfo()
Description copied from interface:BuildLogEx
Returns progress information for the current build.- Specified by:
getProgressInfo
in interfaceBuildLogEx
-
containsMessageWithHint
public boolean containsMessageWithHint(@NotNull String renderingHint)
- Specified by:
containsMessageWithHint
in interfaceBuildLogReaderEx
-
getFirstInternalError
@Nullable public InternalErrorMessageProcessor.LogErrorData getFirstInternalError()
- Specified by:
getFirstInternalError
in interfaceBuildLogReaderEx
-
getFlowStartIndex
@Nullable public Integer getFlowStartIndex(int flowId)
- Specified by:
getFlowStartIndex
in interfaceBuildLogReaderEx
-
getLastIndexSatisfyingKinds
@Nullable public Integer getLastIndexSatisfyingKinds(int startIndex, @NotNull Set<LogMessageKind> kinds, @NotNull LogView logView)
- Specified by:
getLastIndexSatisfyingKinds
in interfaceBuildLogReaderEx
-
getAgentTimeZone
@Nullable public TimeZone getAgentTimeZone()
- Specified by:
getAgentTimeZone
in interfaceBuildLogReaderEx
-
getFirstLevelOpenCloseBlocksToIndex
@NotNull public LinkedHashMap<LogMessageInfo,Integer> getFirstLevelOpenCloseBlocksToIndex(@NotNull LogView logView) throws FlowAwareIndexAccessException
- Specified by:
getFirstLevelOpenCloseBlocksToIndex
in interfaceBuildLogReaderEx
- Throws:
FlowAwareIndexAccessException
-
getHierarchyAndThresholdMessages
@Nullable public Map<LogMessageInfo,Integer> getHierarchyAndThresholdMessages(int thresholdMessageId, @NotNull LogView logView)
- Specified by:
getHierarchyAndThresholdMessages
in interfaceBuildLogReaderEx
-
getFlowIndex
@NotNull public Map<Integer,FlowsMessageProcessor.FlowInfo> getFlowIndex()
- Specified by:
getFlowIndex
in interfaceBuildLogReaderEx
-
collectTestOutput
@NotNull public TestOutput collectTestOutput(int testId)
- Specified by:
collectTestOutput
in interfaceBuildLogReaderEx
-
collectStacktraceTestOutput
@NotNull public TestOutput collectStacktraceTestOutput(int testId)
- Specified by:
collectStacktraceTestOutput
in interfaceBuildLogReaderEx
-
getMessageInfo
@Nullable public LogMessageInfo getMessageInfo(int messageIndex)
- Specified by:
getMessageInfo
in interfaceBuildLogReaderEx
-
getStartedStepsNumber
public int getStartedStepsNumber()
- Specified by:
getStartedStepsNumber
in interfaceBuildLogReaderEx
-
getFlowAwareIndex
public int getFlowAwareIndex(int linearIndex) throws FlowAwareIndexAccessException
- Specified by:
getFlowAwareIndex
in interfaceBuildLogReaderEx
- Throws:
FlowAwareIndexAccessException
-
resolveAnchors
public Map<Integer,Integer> resolveAnchors(@NotNull Set<Integer> indexes) throws AnchorReadException
- Specified by:
resolveAnchors
in interfaceBuildLogReaderEx
- Throws:
AnchorReadException
-
resolveAnchor
public int resolveAnchor(int index, @NotNull LogView logView) throws AnchorReadException, FlowAwareIndexAccessException
- Specified by:
resolveAnchor
in interfaceBuildLogReaderEx
- Throws:
AnchorReadException
FlowAwareIndexAccessException
-
getFormatVersion
public int getFormatVersion()
- Specified by:
getFormatVersion
in interfaceBuildLogReaderEx
-
buildLogExists
public boolean buildLogExists()
- Specified by:
buildLogExists
in interfaceBuildLogReaderEx
-
createIterator
@NotNull public LogMessageIterator createIterator()
- Specified by:
createIterator
in interfaceBuildLogReaderEx
-
createIterator
@NotNull public LogMessageIterator createIterator(int startIndex, boolean strictFlowOpening)
- Specified by:
createIterator
in interfaceBuildLogReaderEx
-
createIterator
@NotNull public LogMessageIterator createIterator(int startIndex, @NotNull LogView logView) throws FlowAwareIndexAccessException
- Specified by:
createIterator
in interfaceBuildLogReaderEx
- Throws:
FlowAwareIndexAccessException
-
createReversedIterator
@NotNull public LogMessageIterator createReversedIterator(int endIndex, @NotNull LogView logView) throws FlowAwareIndexAccessException
- Specified by:
createReversedIterator
in interfaceBuildLogReaderEx
- Throws:
FlowAwareIndexAccessException
-
-