Class BuildLogLocalState
- java.lang.Object
-
- jetbrains.buildServer.serverSide.buildLog.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.
-
-
Constructor Summary
Constructors Constructor Description BuildLogLocalState(String buildLogId, BuildLogFacadeProvider facadeProvider, ServerResponsibility serverResponsibility, BuildPromotionEx buildPromotion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
void
flushIfNeeded()
List<Integer>
getFlowWithChildrenIds(int flowId)
BlockLogMessage
getLastBlockMessage(int flowId)
LogMessage
getLastMessage()
Integer
getParentFlow(int flowId)
List<BlockDescriptor>
getPendingOpenBlocks(Integer flowId, String blockType)
ProgressInfo
getProgressInfo()
long
getSizeEstimate()
boolean
hasLocallyBufferedMessages()
boolean
isClosed()
void
pushMessage(LogMessageData messageData)
Adds a log message to the local buffer which will logged during the next synchronization.<T extends LogMessage>
TpushMessage(LogMessageData messageData, Class<T> responseClass)
Adds a log message to the local buffer and synchronize it right away.
-
-
-
Constructor Detail
-
BuildLogLocalState
public BuildLogLocalState(@NotNull String buildLogId, @NotNull BuildLogFacadeProvider facadeProvider, @NotNull ServerResponsibility serverResponsibility, @NotNull BuildPromotionEx buildPromotion)
-
-
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)
-
getProgressInfo
public ProgressInfo getProgressInfo()
-
getPendingOpenBlocks
@NotNull public List<BlockDescriptor> getPendingOpenBlocks(@Nullable Integer flowId, @Nullable String blockType)
-
getParentFlow
@Nullable public Integer getParentFlow(int flowId)
-
flushIfNeeded
public void flushIfNeeded()
-
flush
public void flush()
-
hasLocallyBufferedMessages
public boolean hasLocallyBufferedMessages()
-
-