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 String
myBuildLogId
-
Constructor Summary
Constructors Constructor Description BuildLogLocalFacade(String buildLogId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestOutput
collectStacktraceTestOutput(int testId)
TestOutput
collectTestOutput(int testId)
boolean
containsMessageWithHint(String renderingHint)
Returnstrue
if some log message has the rendering hint with the same hash code as the providedrenderingHint
.boolean
createLog()
void
ensureFlowAwareIndexIsConstructed()
String
getAgentTimeZoneId()
InternalErrorMessageProcessor.LogErrorData
getFirstInternalError()
LinkedHashMap<LogMessageInfo,Integer>
getFirstLevelOpenCloseBlocksToIndex(boolean useFlowAwareIndex)
int
getFlowAwareIndex(int linearIndex)
Map<Integer,FlowsMessageProcessor.FlowInfo>
getFlowIndex()
Integer
getFlowStartIndex(int flowId)
int
getFormatVersion()
Map<LogMessageInfo,Integer>
getHierarchyAndThresholdMessages(int thresholdMessageId, boolean useFlowAwareIndex)
Date
getLastMessageTimestamp()
Integer
getLastSatisfyingIndex(int startIndex, Set<LogMessageKind> kinds, boolean flowAware)
Returns the index of the last message (beginning from thestartIndex
) having one of the provided message kinds.long
getLogModifiedTime()
long
getLogPositionByIndex(int messageIndex)
LogMessageInfo
getMessageInfo(int messageIndex)
jetbrains.buildServer.serverSide.buildLog.MessagesChunk
getMessagesChunk(int messageIndex, boolean flowAware, boolean reversed)
jetbrains.buildServer.serverSide.buildLog.MessagesReadResult
getMessagesChunkWithLogRepair(long messagePosition, int messageIndex, boolean readOnlyIndexedMessages, boolean logFrozen)
int
getNumberOfMessages()
int
getStartedStepsNumber()
Returns the number of stared steps passed.boolean
logExists()
void
openLog(boolean logFrozen)
Map<Integer,Integer>
readAnchors(Set<Integer> anchors)
jetbrains.buildServer.serverSide.buildLog.OldBuildLogIterator.BlocksData
readBlocksData()
void
scheduleFlowAwareIndexConstruction(ExecutorService executorService)
void
writeLogFilesZip(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:
createLog
in interfaceBuildLogFacade
-
openLog
public void openLog(boolean logFrozen)
- Specified by:
openLog
in interfaceBuildLogFacade
-
logExists
public boolean logExists()
- Specified by:
logExists
in interfaceBuildLogFacade
-
containsMessageWithHint
public boolean containsMessageWithHint(@NotNull String renderingHint)
Returnstrue
if some log message has the rendering hint with the same hash code as the providedrenderingHint
.- Specified by:
containsMessageWithHint
in interfaceBuildLogFacade
-
getFirstInternalError
@Nullable public InternalErrorMessageProcessor.LogErrorData getFirstInternalError()
- Specified by:
getFirstInternalError
in interfaceBuildLogFacade
-
getFlowStartIndex
@Nullable public Integer getFlowStartIndex(int flowId)
- Specified by:
getFlowStartIndex
in 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:
getLastSatisfyingIndex
in interfaceBuildLogFacade
-
getAgentTimeZoneId
@Nullable public String getAgentTimeZoneId()
- Specified by:
getAgentTimeZoneId
in interfaceBuildLogFacade
-
getFirstLevelOpenCloseBlocksToIndex
@NotNull public LinkedHashMap<LogMessageInfo,Integer> getFirstLevelOpenCloseBlocksToIndex(boolean useFlowAwareIndex) throws FlowAwareIndexAccessException
- Specified by:
getFirstLevelOpenCloseBlocksToIndex
in interfaceBuildLogFacade
- Throws:
FlowAwareIndexAccessException
-
getHierarchyAndThresholdMessages
@Nullable public Map<LogMessageInfo,Integer> getHierarchyAndThresholdMessages(int thresholdMessageId, boolean useFlowAwareIndex) throws FlowAwareIndexAccessException
- Specified by:
getHierarchyAndThresholdMessages
in interfaceBuildLogFacade
- Throws:
FlowAwareIndexAccessException
-
getFlowIndex
@NotNull public Map<Integer,FlowsMessageProcessor.FlowInfo> getFlowIndex()
- Specified by:
getFlowIndex
in interfaceBuildLogFacade
-
collectTestOutput
@NotNull public TestOutput collectTestOutput(int testId)
- Specified by:
collectTestOutput
in interfaceBuildLogFacade
-
collectStacktraceTestOutput
@NotNull public TestOutput collectStacktraceTestOutput(int testId)
- Specified by:
collectStacktraceTestOutput
in interfaceBuildLogFacade
-
getMessageInfo
@Nullable public LogMessageInfo getMessageInfo(int messageIndex)
- Specified by:
getMessageInfo
in interfaceBuildLogFacade
-
getStartedStepsNumber
public int getStartedStepsNumber()
Returns the number of stared steps passed.NOTE: for a single-step build
0
is returned.- Specified by:
getStartedStepsNumber
in interfaceBuildLogFacade
- Returns:
- the number of stared steps passed
-
getFlowAwareIndex
public int getFlowAwareIndex(int linearIndex) throws FlowAwareIndexAccessException
- Specified by:
getFlowAwareIndex
in interfaceBuildLogFacade
- Throws:
FlowAwareIndexAccessException
-
readAnchors
@NotNull public Map<Integer,Integer> readAnchors(@NotNull Set<Integer> anchors) throws AnchorReadException
- Specified by:
readAnchors
in interfaceBuildLogFacade
- Throws:
AnchorReadException
-
getNumberOfMessages
public int getNumberOfMessages()
- Specified by:
getNumberOfMessages
in interfaceBuildLogFacade
-
getFormatVersion
public int getFormatVersion()
- Specified by:
getFormatVersion
in interfaceBuildLogFacade
-
readBlocksData
@NotNull public jetbrains.buildServer.serverSide.buildLog.OldBuildLogIterator.BlocksData readBlocksData() throws jetbrains.buildServer.serverSide.buildLog.BrokenBuildLogException, IOException
- Specified by:
readBlocksData
in interfaceBuildLogFacade
- Throws:
jetbrains.buildServer.serverSide.buildLog.BrokenBuildLogException
IOException
-
getLogModifiedTime
public long getLogModifiedTime()
- Specified by:
getLogModifiedTime
in interfaceBuildLogFacade
-
writeLogFilesZip
public void writeLogFilesZip(@NotNull OutputStream destinationStream)
- Specified by:
writeLogFilesZip
in interfaceBuildLogFacade
-
getLastMessageTimestamp
@Nullable public Date getLastMessageTimestamp()
- Specified by:
getLastMessageTimestamp
in interfaceBuildLogFacade
-
ensureFlowAwareIndexIsConstructed
public void ensureFlowAwareIndexIsConstructed() throws FlowAwareIndexAccessException
- Specified by:
ensureFlowAwareIndexIsConstructed
in interfaceBuildLogFacade
- Throws:
FlowAwareIndexAccessException
-
scheduleFlowAwareIndexConstruction
public void scheduleFlowAwareIndexConstruction(@NotNull ExecutorService executorService)
- Specified by:
scheduleFlowAwareIndexConstruction
in interfaceBuildLogFacade
-
getMessagesChunk
@Nullable public jetbrains.buildServer.serverSide.buildLog.MessagesChunk getMessagesChunk(int messageIndex, boolean flowAware, boolean reversed)
- Specified by:
getMessagesChunk
in interfaceBuildLogFacade
-
getMessagesChunkWithLogRepair
@NotNull public jetbrains.buildServer.serverSide.buildLog.MessagesReadResult getMessagesChunkWithLogRepair(long messagePosition, int messageIndex, boolean readOnlyIndexedMessages, boolean logFrozen)
- Specified by:
getMessagesChunkWithLogRepair
in interfaceBuildLogFacade
-
getLogPositionByIndex
public long getLogPositionByIndex(int messageIndex)
- Specified by:
getLogPositionByIndex
in interfaceBuildLogFacade
-
-