Class StatisticsPublisher
- java.lang.Object
-
- jetbrains.buildServer.serverSide.ProjectsModelListenerAdapter
-
- jetbrains.buildServer.serverSide.BuildServerAdapter
-
- jetbrains.buildServer.serverSide.PositionAwareBuildServerAdapter
-
- jetbrains.buildServer.serverSide.statistics.impl.StatisticsPublisher
-
- All Implemented Interfaces:
EventListener
,BuildServerListener
,ProjectsModelListener
,ServerListener
,PositionAware
,PositionConstraintAware
public class StatisticsPublisher extends PositionAwareBuildServerAdapter implements PositionAware
-
-
Field Summary
Fields Modifier and Type Field Description static GenericQuery<Long>
DELETE_OLDEST_PUBLISHED
-
Constructor Summary
Constructors Constructor Description StatisticsPublisher(SBuildServer server, ValueProviderRegistry valueProviderRegistry, SQLRunnerEx sqlRunner, ServerResponsibility serverResponsibility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildFinished(SRunningBuild build)
Called after build finishing, only if build was not interruptedlong
getLastPublished(ValueProvider valueProvider)
boolean
hasSomethingToPublish(ValueProvider key)
void
publishHistory()
boolean
publishHistoryChunk(ValueProvider valueProvider)
void
serverShutdown()
Called when server shutdown has been started.void
serverStartup()
Called when server has been started and its configuration has been loaded from the diskvoid
setExecutor(ScheduledExecutorService executor)
void
setPublishingChunk(int publishingChunk)
protected void
submit(Runnable task)
protected void
submit(Runnable task, long delay)
-
Methods inherited from class jetbrains.buildServer.serverSide.PositionAwareBuildServerAdapter
getConstraint, getOrderId
-
Methods inherited from class jetbrains.buildServer.serverSide.BuildServerAdapter
agentDescriptionUpdated, agentRegistered, agentRemoved, agentRemoved, agentsDescriptionUpdated, agentStatusChanged, agentUnregistered, agentUnregistered, beforeAgentUnregistered, beforeBuildFinish, beforeEntryDelete, beforeServerConfigurationLoaded, buildArtifactsChanged, buildChangedStatus, buildCommented, buildDetachedFromAgent, buildInterrupted, buildPinned, buildProblemsChanged, buildProblemsMuted, buildProblemsUnmuted, buildPromotionTagsChanged, buildQueueOrderChanged, buildRemovedFromQueue, buildStarted, buildTagsChanged, buildTagsChanged, buildTypeAddedToQueue, buildTypeAddedToQueue, buildUnpinned, changeAdded, changesLoaded, changesLoaded, cleanupFinished, cleanupStarted, entriesDeleted, entryCreated, entryDeleted, labelingFailed, labelingSucceed, messageReceived, pluginsLoaded, responsibleChanged, responsibleChanged, responsibleChanged, responsibleChanged, responsibleRemoved, responsibleRemoved, serverConfigurationReloaded, serverShutdownComplete, sourcesVersionReleased, sourcesVersionReleased, sourcesVersionReleased, statisticValuePublished, testsMuted, testsUnmuted
-
Methods inherited from class jetbrains.buildServer.serverSide.ProjectsModelListenerAdapter
beforeBuildTypeDeleted, beforeBuildTypesDeleted, buildTypeActiveStatusChanged, buildTypeDeleted, buildTypeDescriptionUpdated, buildTypeExternalIdChanged, buildTypeMoved, buildTypePersisted, buildTypeRegistered, buildTypeRenamed, buildTypeTemplateDeleted, buildTypeTemplateDeleted, buildTypeTemplateExternalIdChanged, buildTypeTemplateMoved, buildTypeTemplatePersisted, buildTypeTemplateRestored, buildTypeUnregistered, projectArchived, projectCreated, projectDearchived, projectDescriptionUpdated, projectExternalIdChanged, projectFeatureAdded, projectFeatureChanged, projectFeatureRemoved, projectMoved, projectPersisted, projectPluginDataFileRemoved, projectPluginDataFileSaved, projectRemoved, projectRemoved, projectRenamed, projectRestored, vcsRootExternalIdChanged, vcsRootMoved, vcsRootPersisted, vcsRootRemoved, vcsRootsPersisted, vcsRootUpdated
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.util.positioning.PositionAware
getOrderId
-
Methods inherited from interface jetbrains.buildServer.util.positioning.PositionConstraintAware
getConstraint
-
Methods inherited from interface jetbrains.buildServer.serverSide.ProjectsModelListener
beforeBuildTypeDeleted, beforeBuildTypesDeleted, buildTypeActiveStatusChanged, buildTypeDeleted, buildTypeDescriptionUpdated, buildTypeExternalIdChanged, buildTypeMoved, buildTypePersisted, buildTypeRegistered, buildTypeRenamed, buildTypeTemplateDeleted, buildTypeTemplateDeleted, buildTypeTemplateExternalIdChanged, buildTypeTemplateMoved, buildTypeTemplatePersisted, buildTypeTemplateRestored, buildTypeUnregistered, projectArchived, projectCreated, projectDearchived, projectDescriptionUpdated, projectExternalIdChanged, projectFeatureAdded, projectFeatureChanged, projectFeatureRemoved, projectMoved, projectPersisted, projectPluginDataFileRemoved, projectPluginDataFileSaved, projectRemoved, projectRemoved, projectRenamed, projectRestored, vcsRootExternalIdChanged, vcsRootMoved, vcsRootPersisted, vcsRootRemoved, vcsRootsPersisted, vcsRootUpdated
-
-
-
-
Field Detail
-
DELETE_OLDEST_PUBLISHED
public static final GenericQuery<Long> DELETE_OLDEST_PUBLISHED
-
-
Constructor Detail
-
StatisticsPublisher
public StatisticsPublisher(SBuildServer server, ValueProviderRegistry valueProviderRegistry, SQLRunnerEx sqlRunner, ServerResponsibility serverResponsibility)
-
-
Method Detail
-
serverShutdown
public void serverShutdown()
Description copied from interface:ServerListener
Called when server shutdown has been started. In addition, this method is called for a plugin before it is unloaded, may be used for releasing resources and cleanup.- Specified by:
serverShutdown
in interfaceServerListener
- Overrides:
serverShutdown
in classBuildServerAdapter
-
serverStartup
public void serverStartup()
Description copied from interface:ServerListener
Called when server has been started and its configuration has been loaded from the disk- Specified by:
serverStartup
in interfaceServerListener
- Overrides:
serverStartup
in classBuildServerAdapter
-
publishHistory
public void publishHistory()
-
submit
protected void submit(Runnable task)
-
submit
protected void submit(Runnable task, long delay)
-
getLastPublished
public long getLastPublished(ValueProvider valueProvider)
-
buildFinished
public void buildFinished(@NotNull SRunningBuild build)
Description copied from interface:BuildServerListener
Called after build finishing, only if build was not interrupted- Specified by:
buildFinished
in interfaceBuildServerListener
- Overrides:
buildFinished
in classBuildServerAdapter
- Parameters:
build
- running build // TODO: shall pass SFinishedBuild as parameter
-
hasSomethingToPublish
public boolean hasSomethingToPublish(ValueProvider key)
-
publishHistoryChunk
public boolean publishHistoryChunk(ValueProvider valueProvider)
- Parameters:
valueProvider
-- Returns:
- true is there is something to publish after the chunk publishing
-
setExecutor
public void setExecutor(ScheduledExecutorService executor)
-
setPublishingChunk
public void setPublishingChunk(int publishingChunk)
-
-