|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory
public class BuildMemory
Keeps track of what builds have been triggered and if all builds are done for specific events.
Nested Class Summary | |
---|---|
static class |
BuildMemory.MemoryImprint
A holder for all builds triggered by one event. |
Constructor Summary | |
---|---|
BuildMemory()
|
Method Summary | |
---|---|
void |
completed(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.AbstractBuild build)
Sets the memory that a build is completed for an event. |
void |
forget(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Removes the memory for the event. |
List<hudson.model.AbstractBuild> |
getBuilds(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Returns all started builds in memory for the event. |
BuildsStartedStats |
getBuildsStartedStats(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Gets the statistics of started builds for a specific memory imprint. |
BuildMemory.MemoryImprint |
getMemoryImprint(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Gets the memory of a specific event. |
String |
getStatusReport(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Returns the status report for the given MemoryImprint. |
boolean |
isAllBuildsCompleted(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Tells if all triggered builds have started for a specific memory imprint. |
boolean |
isAllBuildsStarted(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Tells if all triggered builds have started for a specific memory imprint. |
boolean |
isBuilding(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Checks if the provided event exists in this memory. |
boolean |
isBuilding(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.AbstractProject project)
Checks in memory if the project is building the event. |
boolean |
isTriggered(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.AbstractProject project)
Checks in memory if the project has been triggered for the event. |
void |
retriggered(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.AbstractProject project,
List<hudson.model.AbstractBuild> otherBuilds)
Adds a new memory about a build that has been retriggered. |
void |
setEntryFailureMessage(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.AbstractBuild r,
String failureMessage)
Records the failure message for the given build. |
void |
started(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.AbstractBuild build)
Sets the memory that a build has started for an event. |
void |
triggered(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.AbstractProject project)
Adds a new memory about a build that has been/will be triggered. |
void |
updateTriggerContext(GerritCause cause,
hudson.model.AbstractBuild r)
Updates the TriggerContext for the event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuildMemory()
Method Detail |
---|
public BuildMemory.MemoryImprint getMemoryImprint(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event.
public boolean isAllBuildsCompleted(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event.
public BuildsStartedStats getBuildsStartedStats(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event.
public String getStatusReport(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event.
BuildMemory.MemoryImprint.getStatusReport()
public boolean isAllBuildsStarted(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event.
public void completed(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.AbstractBuild build)
event
- the eventbuild
- the build.public void started(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.AbstractBuild build)
event
- the event.build
- the build.public void triggered(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.AbstractProject project)
event
- the event that triggered it.project
- the project that was triggered.public void retriggered(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.AbstractProject project, List<hudson.model.AbstractBuild> otherBuilds)
event
- the event to be retriggered.project
- the project that has been retriggered.otherBuilds
- the list of other builds that was in the "old" memory.public void forget(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event.public void updateTriggerContext(GerritCause cause, hudson.model.AbstractBuild r)
TriggerContext
for the event. The cause and build is the "focal point" for the update, but
all memory entities will be updated, but only the current context will be TriggerContext.setThisBuild(hudson.model.AbstractBuild)
updated.
cause
- the cause.r
- the build the cause is in.public boolean isTriggered(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.AbstractProject project)
event
- the event.project
- the project.
public boolean isBuilding(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.AbstractProject project)
event
- the event.project
- the project.
public boolean isBuilding(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event to look for.
public List<hudson.model.AbstractBuild> getBuilds(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event.
public void setEntryFailureMessage(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.AbstractBuild r, String failureMessage)
event
- the event.r
- the build that caused the failure.failureMessage
- the failure message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |