Class ClosedStatefulBuildLog
- java.lang.Object
-
- jetbrains.buildServer.serverSide.buildLog.ClosedStatefulBuildLog
-
- All Implemented Interfaces:
PersisterFacade
,StatefulBuildLog
public class ClosedStatefulBuildLog extends Object implements StatefulBuildLog, PersisterFacade
-
-
Constructor Summary
Constructors Constructor Description ClosedStatefulBuildLog(String buildLogId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
dispose()
int
getNextMessageIndex()
boolean
hasNotFlushedMessages()
boolean
isClosed()
void
refreshNextMessageIndex()
void
remotePersistBlocksUpdate(List<Integer> messageIndexes, Status status, Date finishTs)
int
remotePersistLogMessage(LogMessageInfo info)
IdRange
reserveAnchorsRange(int rangeSize)
StateSynchronizationResult
synchronizeState(List<LogMessageData> messages, Map<Integer,Long> clientFlowSnapshotVersions, FlushDirective flushDirective, boolean lastMessageLoggingResultRequested)
Accepts unprocessed messages, logs them and returns an update for build-log state snapshot.
-
-
-
Constructor Detail
-
ClosedStatefulBuildLog
public ClosedStatefulBuildLog(@NotNull String buildLogId)
-
-
Method Detail
-
synchronizeState
@NotNull public StateSynchronizationResult synchronizeState(@NotNull List<LogMessageData> messages, @NotNull Map<Integer,Long> clientFlowSnapshotVersions, @NotNull FlushDirective flushDirective, boolean lastMessageLoggingResultRequested)
Description copied from interface:StatefulBuildLog
Accepts unprocessed messages, logs them and returns an update for build-log state snapshot.- Specified by:
synchronizeState
in interfaceStatefulBuildLog
- Parameters:
messages
- list of messages to be logged.clientFlowSnapshotVersions
- flow snapshot versions known by client (the method should only provide snapshot for flows that are outdated or missing). If client does not have any snapshots, then empty map should be provided.lastMessageLoggingResultRequested
- should result of last message logging be included into the response.- Returns:
- an update for the build-log snapshot.
-
reserveAnchorsRange
@NotNull public IdRange reserveAnchorsRange(int rangeSize) throws AnchorsReservationException
- Specified by:
reserveAnchorsRange
in interfaceStatefulBuildLog
- Throws:
AnchorsReservationException
-
hasNotFlushedMessages
public boolean hasNotFlushedMessages()
- Specified by:
hasNotFlushedMessages
in interfaceStatefulBuildLog
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceStatefulBuildLog
-
close
public void close()
- Specified by:
close
in interfaceStatefulBuildLog
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceStatefulBuildLog
-
getNextMessageIndex
@TestOnly public int getNextMessageIndex()
- Specified by:
getNextMessageIndex
in interfacePersisterFacade
-
refreshNextMessageIndex
public void refreshNextMessageIndex()
- Specified by:
refreshNextMessageIndex
in interfacePersisterFacade
-
remotePersistLogMessage
public int remotePersistLogMessage(@NotNull LogMessageInfo info)
- Specified by:
remotePersistLogMessage
in interfacePersisterFacade
-
remotePersistBlocksUpdate
public void remotePersistBlocksUpdate(@NotNull List<Integer> messageIndexes, @Nullable Status status, @Nullable Date finishTs)
- Specified by:
remotePersistBlocksUpdate
in interfacePersisterFacade
-
-