Class BuildLogLocalFacade
- java.lang.Object
-
- jetbrains.buildServer.serverSide.buildLog.BuildLogLocalFacade
-
- All Implemented Interfaces:
BuildLogFacade
- Direct Known Subclasses:
StatefulBuildLogLocalFacade
@ThreadSafe public class BuildLogLocalFacade extends Object implements BuildLogFacade
-
-
Field Summary
Fields Modifier and Type Field Description protected StringmyBuildLogId
-
Constructor Summary
Constructors Constructor Description BuildLogLocalFacade(String buildLogId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestOutputcollectStacktraceTestOutput(int testId)TestOutputcollectTestOutput(int testId)booleancontainsMessageWithHint(String renderingHint)Returnstrueif some log message has the rendering hint with the same hash code as the providedrenderingHint.booleancreateLog()voidensureFlowAwareIndexIsConstructed()StringgetAgentTimeZoneId()InternalErrorMessageProcessor.LogErrorDatagetFirstInternalError()LinkedHashMap<LogMessageInfo,Integer>getFirstLevelOpenCloseBlocksToIndex(boolean useFlowAwareIndex)intgetFlowAwareIndex(int linearIndex)Map<Integer,FlowsMessageProcessor.FlowInfo>getFlowIndex()IntegergetFlowStartIndex(int flowId)intgetFormatVersion()Map<LogMessageInfo,Integer>getHierarchyAndThresholdMessages(int thresholdMessageId, boolean useFlowAwareIndex)DategetLastMessageTimestamp()IntegergetLastSatisfyingIndex(int startIndex, Set<LogMessageKind> kinds, boolean flowAware)Returns the index of the last message (beginning from thestartIndex) having one of the provided message kinds.longgetLogModifiedTime()longgetLogPositionByIndex(int messageIndex)LogMessageInfogetMessageInfo(int messageIndex)jetbrains.buildServer.serverSide.buildLog.MessagesChunkgetMessagesChunk(int messageIndex, boolean flowAware, boolean reversed)jetbrains.buildServer.serverSide.buildLog.MessagesReadResultgetMessagesChunkWithLogRepair(long messagePosition, int messageIndex, boolean readOnlyIndexedMessages, boolean logFrozen)intgetNumberOfMessages()intgetStartedStepsNumber()Returns the number of stared steps passed.booleanlogExists()voidopenLog(boolean logFrozen)Map<Integer,Integer>readAnchors(Set<Integer> anchors)jetbrains.buildServer.serverSide.buildLog.OldBuildLogIterator.BlocksDatareadBlocksData()voidscheduleFlowAwareIndexConstruction(ExecutorService executorService)voidwriteLogFilesZip(OutputStream destinationStream)
-
-
-
Field Detail
-
myBuildLogId
@NotNull protected final String myBuildLogId
-
-
Constructor Detail
-
BuildLogLocalFacade
public BuildLogLocalFacade(@NotNull String buildLogId)
-
-
Method Detail
-
createLog
public boolean createLog()
- Specified by:
createLogin interfaceBuildLogFacade
-
openLog
public void openLog(boolean logFrozen)
- Specified by:
openLogin interfaceBuildLogFacade
-
logExists
public boolean logExists()
- Specified by:
logExistsin interfaceBuildLogFacade
-
containsMessageWithHint
public boolean containsMessageWithHint(@NotNull String renderingHint)Returnstrueif some log message has the rendering hint with the same hash code as the providedrenderingHint.- Specified by:
containsMessageWithHintin interfaceBuildLogFacade
-
getFirstInternalError
@Nullable public InternalErrorMessageProcessor.LogErrorData getFirstInternalError()
- Specified by:
getFirstInternalErrorin interfaceBuildLogFacade
-
getFlowStartIndex
@Nullable public Integer getFlowStartIndex(int flowId)
- Specified by:
getFlowStartIndexin interfaceBuildLogFacade
-
getLastSatisfyingIndex
@Nullable public Integer getLastSatisfyingIndex(int startIndex, @NotNull Set<LogMessageKind> kinds, boolean flowAware)
Returns the index of the last message (beginning from thestartIndex) having one of the provided message kinds.- Specified by:
getLastSatisfyingIndexin interfaceBuildLogFacade
-
getAgentTimeZoneId
@Nullable public String getAgentTimeZoneId()
- Specified by:
getAgentTimeZoneIdin interfaceBuildLogFacade
-
getFirstLevelOpenCloseBlocksToIndex
@NotNull public LinkedHashMap<LogMessageInfo,Integer> getFirstLevelOpenCloseBlocksToIndex(boolean useFlowAwareIndex) throws FlowAwareIndexAccessException
- Specified by:
getFirstLevelOpenCloseBlocksToIndexin interfaceBuildLogFacade- Throws:
FlowAwareIndexAccessException
-
getHierarchyAndThresholdMessages
@Nullable public Map<LogMessageInfo,Integer> getHierarchyAndThresholdMessages(int thresholdMessageId, boolean useFlowAwareIndex) throws FlowAwareIndexAccessException
- Specified by:
getHierarchyAndThresholdMessagesin interfaceBuildLogFacade- Throws:
FlowAwareIndexAccessException
-
getFlowIndex
@NotNull public Map<Integer,FlowsMessageProcessor.FlowInfo> getFlowIndex()
- Specified by:
getFlowIndexin interfaceBuildLogFacade
-
collectTestOutput
@NotNull public TestOutput collectTestOutput(int testId)
- Specified by:
collectTestOutputin interfaceBuildLogFacade
-
collectStacktraceTestOutput
@NotNull public TestOutput collectStacktraceTestOutput(int testId)
- Specified by:
collectStacktraceTestOutputin interfaceBuildLogFacade
-
getMessageInfo
@Nullable public LogMessageInfo getMessageInfo(int messageIndex)
- Specified by:
getMessageInfoin interfaceBuildLogFacade
-
getStartedStepsNumber
public int getStartedStepsNumber()
Returns the number of stared steps passed.NOTE: for a single-step build
0is returned.- Specified by:
getStartedStepsNumberin interfaceBuildLogFacade- Returns:
- the number of stared steps passed
-
getFlowAwareIndex
public int getFlowAwareIndex(int linearIndex) throws FlowAwareIndexAccessException- Specified by:
getFlowAwareIndexin interfaceBuildLogFacade- Throws:
FlowAwareIndexAccessException
-
readAnchors
@NotNull public Map<Integer,Integer> readAnchors(@NotNull Set<Integer> anchors) throws AnchorReadException
- Specified by:
readAnchorsin interfaceBuildLogFacade- Throws:
AnchorReadException
-
getNumberOfMessages
public int getNumberOfMessages()
- Specified by:
getNumberOfMessagesin interfaceBuildLogFacade
-
getFormatVersion
public int getFormatVersion()
- Specified by:
getFormatVersionin interfaceBuildLogFacade
-
readBlocksData
@NotNull public jetbrains.buildServer.serverSide.buildLog.OldBuildLogIterator.BlocksData readBlocksData() throws jetbrains.buildServer.serverSide.buildLog.BrokenBuildLogException, IOException- Specified by:
readBlocksDatain interfaceBuildLogFacade- Throws:
jetbrains.buildServer.serverSide.buildLog.BrokenBuildLogExceptionIOException
-
getLogModifiedTime
public long getLogModifiedTime()
- Specified by:
getLogModifiedTimein interfaceBuildLogFacade
-
writeLogFilesZip
public void writeLogFilesZip(@NotNull OutputStream destinationStream)- Specified by:
writeLogFilesZipin interfaceBuildLogFacade
-
getLastMessageTimestamp
@Nullable public Date getLastMessageTimestamp()
- Specified by:
getLastMessageTimestampin interfaceBuildLogFacade
-
ensureFlowAwareIndexIsConstructed
public void ensureFlowAwareIndexIsConstructed() throws FlowAwareIndexAccessException- Specified by:
ensureFlowAwareIndexIsConstructedin interfaceBuildLogFacade- Throws:
FlowAwareIndexAccessException
-
scheduleFlowAwareIndexConstruction
public void scheduleFlowAwareIndexConstruction(@NotNull ExecutorService executorService)- Specified by:
scheduleFlowAwareIndexConstructionin interfaceBuildLogFacade
-
getMessagesChunk
@Nullable public jetbrains.buildServer.serverSide.buildLog.MessagesChunk getMessagesChunk(int messageIndex, boolean flowAware, boolean reversed)- Specified by:
getMessagesChunkin interfaceBuildLogFacade
-
getMessagesChunkWithLogRepair
@NotNull public jetbrains.buildServer.serverSide.buildLog.MessagesReadResult getMessagesChunkWithLogRepair(long messagePosition, int messageIndex, boolean readOnlyIndexedMessages, boolean logFrozen)- Specified by:
getMessagesChunkWithLogRepairin interfaceBuildLogFacade
-
getLogPositionByIndex
public long getLogPositionByIndex(int messageIndex)
- Specified by:
getLogPositionByIndexin interfaceBuildLogFacade
-
-