code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
public Date getLastHeardTime() {
return lastHeardTime;
} | Understands runtime and configuration information of a builder machine | getLastHeardTime | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean canDisable() {
return agentConfigStatus != Disabled;
} | Understands runtime and configuration information of a builder machine | canDisable | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public void refresh() {
if (agentConfigStatus == Pending) {
return;
}
if (lastHeardTime == null) {
updateRuntimeStatus(Missing);
lastHeardTime = new Date();
}
if (isTimeout(lastHeardTime)) {
updateRuntimeStatus(LostContact);
... | Understands runtime and configuration information of a builder machine | refresh | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public void lostContact() {
if (agentConfigStatus == Pending || agentConfigStatus == Disabled) {
return;
}
updateRuntimeStatus(LostContact);
} | Understands runtime and configuration information of a builder machine | lostContact | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
boolean isTimeout(Date lastHeardTime) {
return (timeProvider.currentTimeMillis() - lastHeardTime.getTime()) / 1000 >= systemEnvironment.getAgentConnectionTimeout();
} | Understands runtime and configuration information of a builder machine | isTimeout | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
} | Understands runtime and configuration information of a builder machine | toString | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean assignCertification() {
return !Pending.equals(agentConfigStatus);
} | Understands runtime and configuration information of a builder machine | assignCertification | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public AgentType getType() {
return agentType;
} | Understands runtime and configuration information of a builder machine | getType | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public void update(AgentRuntimeInfo newRuntimeInfo) {
syncRuntimeStatus(newRuntimeInfo.getRuntimeStatus());
syncIp(newRuntimeInfo);
this.lastHeardTime = new Date();
this.agentRuntimeInfo.updateSelf(newRuntimeInfo);
} | Understands runtime and configuration information of a builder machine | update | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
private void syncIp(AgentRuntimeInfo info) {
String ipAddress = (agentType == AgentType.LOCAL || agentType == AgentType.REMOTE) ? info.getIpAdress() : agent.getIpaddress();
this.agent.setIpaddress(ipAddress);
} | Understands runtime and configuration information of a builder machine | syncIp | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isIpChangeRequired(String newIpAdress) {
return !StringUtils.equals(this.agent.getIpaddress(), newIpAdress) && this.isRegistered();
} | Understands runtime and configuration information of a builder machine | isIpChangeRequired | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public String getLocation() {
return agentRuntimeInfo.getLocation();
} | Understands runtime and configuration information of a builder machine | getLocation | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isRegistered() {
return !isPending();
} | Understands runtime and configuration information of a builder machine | isRegistered | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isPending() {
return agentConfigStatus == Pending;
} | Understands runtime and configuration information of a builder machine | isPending | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isDisabled() {
return getAgent().isDisabled();
} | Understands runtime and configuration information of a builder machine | isDisabled | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isIdle() {
return agentRuntimeInfo.getRuntimeStatus() == Idle;
} | Understands runtime and configuration information of a builder machine | isIdle | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isBuilding() {
return agentRuntimeInfo.getRuntimeStatus() == Building;
} | Understands runtime and configuration information of a builder machine | isBuilding | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isCancelled() {
return agentRuntimeInfo.getRuntimeStatus() == AgentRuntimeStatus.Cancelled;
} | Understands runtime and configuration information of a builder machine | isCancelled | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isMissing() {
return agentRuntimeInfo.getRuntimeStatus() == Missing;
} | Understands runtime and configuration information of a builder machine | isMissing | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean shouldKillRunningTasks() {
return killRunningTasks;
} | Understands runtime and configuration information of a builder machine | shouldKillRunningTasks | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public AgentIdentifier getAgentIdentifier() {
return getAgent().getAgentIdentifier();
} | Understands runtime and configuration information of a builder machine | getAgentIdentifier | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public ResourceConfigs getResourceConfigs() {
return new ResourceConfigs(getAgent().getResources());
} | Understands runtime and configuration information of a builder machine | getResourceConfigs | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public String getIpAddress() {
return agent.getIpaddress();
} | Understands runtime and configuration information of a builder machine | getIpAddress | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public JobPlan firstMatching(List<JobPlan> jobPlans) {
for (JobPlan jobPlan : jobPlans) {
if (jobPlan.requiresElasticAgent()) {
continue;
}
if (jobPlan.assignedToAgent() && isNotElasticAndResourcesMatchForNonElasticAgents(jobPlan)) {
return job... | Understands runtime and configuration information of a builder machine | firstMatching | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
private boolean isNotElasticAndResourcesMatchForNonElasticAgents(JobPlan jobPlan) {
return !jobPlan.requiresElasticAgent() && !isElastic() && agent.hasAllResources(jobPlan.getResources().toResourceConfigs().resourceNames());
} | Understands runtime and configuration information of a builder machine | isNotElasticAndResourcesMatchForNonElasticAgents | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
private void clearCancelledState() {
this.cancelledAt = null;
this.killRunningTasks = false;
} | Understands runtime and configuration information of a builder machine | clearCancelledState | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public String getBuildLocator() {
return agentRuntimeInfo.getBuildingInfo().getBuildLocator();
} | Understands runtime and configuration information of a builder machine | getBuildLocator | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public DiskSpace freeDiskSpace() {
return agentRuntimeInfo.freeDiskSpace();
} | Understands runtime and configuration information of a builder machine | freeDiskSpace | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public AgentRuntimeStatus getRuntimeStatus() {
return agentRuntimeInfo.getRuntimeStatus();
} | Understands runtime and configuration information of a builder machine | getRuntimeStatus | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public String agentInfoForDisplay() {
return agentRuntimeInfo.agentInfoForDisplay();
} | Understands runtime and configuration information of a builder machine | agentInfoForDisplay | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isElastic() {
return agentRuntimeInfo.isElastic();
} | Understands runtime and configuration information of a builder machine | isElastic | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public ElasticAgentMetadata elasticAgentMetadata() {
ElasticAgentRuntimeInfo runtimeInfo = (ElasticAgentRuntimeInfo) this.agentRuntimeInfo;
return new ElasticAgentMetadata(getUuid(), runtimeInfo.getElasticAgentId(), runtimeInfo.getElasticPluginId(), this.agentRuntimeInfo.getRuntimeStatus(), getAgentConf... | Understands runtime and configuration information of a builder machine | elasticAgentMetadata | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean canBeDeleted() {
return isDisabled() && !(isBuilding() || isCancelled());
} | Understands runtime and configuration information of a builder machine | canBeDeleted | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean matches(FilterBy filter) {
return switch (filter) {
case Pending -> isPending();
case Elastic -> isElastic();
case Null -> isNullAgent();
};
} | Understands runtime and configuration information of a builder machine | matches | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public Date cancelledAt() {
return cancelledAt;
} | Understands runtime and configuration information of a builder machine | cancelledAt | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isStuckInCancel() {
int TEN_MINUTES = 600000;
if (isCancelled() && cancelledAt != null) {
return (timeProvider.currentUtilDate().getTime() - cancelledAt.getTime()) > TEN_MINUTES;
}
return false;
} | Understands runtime and configuration information of a builder machine | isStuckInCancel | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public AgentInstruction agentInstruction() {
if (isCancelled() && shouldKillRunningTasks()) {
return KILL_RUNNING_TASKS;
}
if (isCancelled()) {
return CANCEL;
}
return NONE;
} | Understands runtime and configuration information of a builder machine | agentInstruction | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public static AgentInstance createFromAgent(Agent agent, SystemEnvironment systemEnvironment,
AgentStatusChangeListener agentStatusChangeListener) {
AgentType type = agent.isFromLocalHost() ? AgentType.LOCAL : AgentType.REMOTE;
AgentInstance agentInstance ... | Understands runtime and configuration information of a builder machine | createFromAgent | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public static AgentInstance createFromLiveAgent(AgentRuntimeInfo agentRuntimeInfo, SystemEnvironment sysEnv,
AgentStatusChangeListener agentStatusChangeListener) {
Agent agent = agentRuntimeInfo.agent();
AgentType type = agent.isFromLocalHost() ? Agent... | Understands runtime and configuration information of a builder machine | createFromLiveAgent | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public ConfigErrors errors() {
return errors;
} | Understands runtime and configuration information of a builder machine | errors | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
return equals((AgentInstance) that);
} | Understands runtime and configuration information of a builder machine | equals | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
private boolean equals(AgentInstance that) {
if (this.agent == null ? that.agent != null : !this.agent.equals(that.agent)) {
return false;
}
if (this.agentRuntimeInfo == null ? that.agentRuntimeInfo != null : !this.agentRuntimeInfo.equals(that.agentRuntimeInfo)) {
return ... | Understands runtime and configuration information of a builder machine | equals | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
@Override
public int hashCode() {
int result;
result = (agent != null ? agent.hashCode() : 0);
result = 31 * result + (agentType != null ? agentType.hashCode() : 0);
result = 31 * result + (agentRuntimeInfo != null ? agentRuntimeInfo.hashCode() : 0);
result = 31 * result + (l... | Understands runtime and configuration information of a builder machine | hashCode | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean canRemove() {
if (agentConfigStatus == Pending && isTimeout(lastHeardTime)) {
return true;
}
return false;
} | Understands runtime and configuration information of a builder machine | canRemove | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public String getOperatingSystem() {
String os = agentRuntimeInfo.getOperatingSystem();
return os == null ? "" : os;
} | Understands runtime and configuration information of a builder machine | getOperatingSystem | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isLowDiskSpace() {
long limit = new SystemEnvironment().getAgentSizeLimit();
return agentRuntimeInfo.isLowDiskSpace(limit);
} | Understands runtime and configuration information of a builder machine | isLowDiskSpace | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public boolean isNullAgent() {
return false;
} | Understands runtime and configuration information of a builder machine | isNullAgent | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
private void updateRuntimeStatus(AgentRuntimeStatus agentRuntimeStatus) {
if (this.agentRuntimeInfo.getRuntimeStatus() != agentRuntimeStatus) {
this.agentRuntimeInfo.setRuntimeStatus(agentRuntimeStatus);
notifyStatusChange();
}
} | Understands runtime and configuration information of a builder machine | updateRuntimeStatus | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public String getAgentVersion() {
return agentRuntimeInfo.getAgentVersion();
} | Understands runtime and configuration information of a builder machine | getAgentVersion | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public String getAgentBootstrapperVersion() {
return agentRuntimeInfo.getAgentBootstrapperVersion();
} | Understands runtime and configuration information of a builder machine | getAgentBootstrapperVersion | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
private void updateConfigStatus(AgentConfigStatus agentConfigStatus) {
if (this.agentConfigStatus != agentConfigStatus) {
this.agentConfigStatus = agentConfigStatus;
notifyStatusChange();
}
} | Understands runtime and configuration information of a builder machine | updateConfigStatus | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
private void notifyStatusChange() {
if (this.isRegistered()) {
this.agentStatusChangeListener.onAgentStatusChange(this);
}
} | Understands runtime and configuration information of a builder machine | notifyStatusChange | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentInstance.java | Apache-2.0 |
public AgentRuntimeStatus buildState() {
return switch (this) {
case Idle, Cancelled, Building -> this;
default -> Unknown;
};
} | Understands live information about an agent | buildState | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentRuntimeStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentRuntimeStatus.java | Apache-2.0 |
public AgentRuntimeStatus agentState() {
return switch (this) {
case Idle, Missing, LostContact, Building -> this;
case Cancelled -> Building;
default -> Unknown;
};
} | Understands live information about an agent | agentState | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentRuntimeStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentRuntimeStatus.java | Apache-2.0 |
public static AgentStatus fromRuntime(AgentRuntimeStatus runtimeStatus) {
if (runtimeStatus == AgentRuntimeStatus.LostContact) { return LostContact; }
if (runtimeStatus == AgentRuntimeStatus.Missing) { return Missing; }
if (runtimeStatus == AgentRuntimeStatus.Building) { return Building; }
... | Understands different states agent can be in | fromRuntime | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
public static AgentStatus fromConfig(AgentConfigStatus configStatus) {
if (configStatus == AgentConfigStatus.Pending) { return Pending; }
if (configStatus == AgentConfigStatus.Disabled) { return Disabled; }
throw new IllegalArgumentException("Unknown config status " + configStatus);
} | Understands different states agent can be in | fromConfig | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
public boolean isEnabled() {
return this.configStatus == AgentConfigStatus.Enabled;
} | Understands different states agent can be in | isEnabled | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
public boolean isRegistered() {
return this.configStatus != AgentConfigStatus.Pending;
} | Understands different states agent can be in | isRegistered | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
public boolean isIdle() {
return this.runtimeStatus == AgentRuntimeStatus.Idle;
} | Understands different states agent can be in | isIdle | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
@Override
public String toString() {
return name;
} | Understands different states agent can be in | toString | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
public AgentRuntimeStatus getRuntimeStatus() {
return runtimeStatus;
} | Understands different states agent can be in | getRuntimeStatus | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
public AgentConfigStatus getConfigStatus() {
return configStatus;
} | Understands different states agent can be in | getConfigStatus | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/AgentStatus.java | Apache-2.0 |
@Override
public long stream(Consumer<String> action) throws IOException {
long linesStreamed = 0L;
if (null == stream) stream = Files.lines(path, new SystemEnvironment().consoleLogCharset()).skip(start);
if (null == iterator) iterator = stream.iterator();
while (iterator.hasNext()... | Applies a lambda (or equivalent {@link Consumer}) to each line and increments the totalLinesConsumed() until
EOF. Multiple invocations to this method will continue from where it left off if new content was appended after
the last read.
@param action the lambda to apply to each line
@return the number of lines streamed... | stream | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/ConsoleStreamer.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/ConsoleStreamer.java | Apache-2.0 |
@Override
public void close() {
if (stream != null) {
stream.close();
}
stream = null;
iterator = null;
} | Applies a lambda (or equivalent {@link Consumer}) to each line and increments the totalLinesConsumed() until
EOF. Multiple invocations to this method will continue from where it left off if new content was appended after
the last read.
@param action the lambda to apply to each line
@return the number of lines streamed... | close | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/ConsoleStreamer.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/ConsoleStreamer.java | Apache-2.0 |
@Override
public long totalLinesConsumed() {
return count;
} | Applies a lambda (or equivalent {@link Consumer}) to each line and increments the totalLinesConsumed() until
EOF. Multiple invocations to this method will continue from where it left off if new content was appended after
the last read.
@param action the lambda to apply to each line
@return the number of lines streamed... | totalLinesConsumed | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/ConsoleStreamer.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/ConsoleStreamer.java | Apache-2.0 |
public Map<String, Object> toMap() {
Map<String, Object> map = new HashMap<>();
map.put("id", id);
map.put("pipelineName", pipelineName);
map.put("stageName", stageName);
map.put("myCheckin", myCheckin);
map.put("event", event.toString());
return map;
} | Used for JSON serialization in Rails
@return a Map representation of this {@link NotificationFilter} instance that is serializable by JRuby | toMap | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NotificationFilter filter = (NotificationFilter) o;
if (myCheckin != filter.myCheckin) {
re... | Used for JSON serialization in Rails
@return a Map representation of this {@link NotificationFilter} instance that is serializable by JRuby | equals | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | Apache-2.0 |
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (pipelineName != null ? pipelineName.hashCode() : 0);
result = 31 * result + (stageName != null ? stageName.hashCode() : 0);
result = 31 * result + (event != null ? event.hashCode() : 0);
... | Used for JSON serialization in Rails
@return a Map representation of this {@link NotificationFilter} instance that is serializable by JRuby | hashCode | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | Apache-2.0 |
public boolean include(NotificationFilter filter) {
return pipelineName.equals(filter.pipelineName)
&& stageName.equals(filter.stageName)
&& event.include(filter.event);
} | Used for JSON serialization in Rails
@return a Map representation of this {@link NotificationFilter} instance that is serializable by JRuby | include | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | Apache-2.0 |
@Override
public void validate(ValidationContext validationContext) {
if (equalsIgnoreCase(this.pipelineName, "[Any Pipeline]")) {
return;
}
PipelineConfig pipelineConfig = validationContext.getCruiseConfig()
.getPipelineConfigByName(new CaseInsensitiveString(this.pi... | Used for JSON serialization in Rails
@return a Map representation of this {@link NotificationFilter} instance that is serializable by JRuby | validate | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | Apache-2.0 |
@Override
public ConfigErrors errors() {
return this.errors;
} | Used for JSON serialization in Rails
@return a Map representation of this {@link NotificationFilter} instance that is serializable by JRuby | errors | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | Apache-2.0 |
@Override
public void addError(String fieldName, String message) {
this.errors.add(fieldName, message);
} | Used for JSON serialization in Rails
@return a Map representation of this {@link NotificationFilter} instance that is serializable by JRuby | addError | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/NotificationFilter.java | Apache-2.0 |
private void recomputeFromModification(Material material) {
if (material instanceof DependencyMaterial) {
this.fromRevision = this.toRevision;
}
} | Understands pipeline instance's reference to modifications | recomputeFromModification | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public Material getMaterial() {
return toRevision.getMaterialInstance().toOldMaterial(name, folder, null);
} | Understands pipeline instance's reference to modifications | getMaterial | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public MaterialInstance getMaterialInstance() {
return toRevision.getMaterialInstance();
} | Understands pipeline instance's reference to modifications | getMaterialInstance | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public List<Modification> getModifications() {
return new Modifications(fromRevision, toRevision);
} | Understands pipeline instance's reference to modifications | getModifications | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public Modification getFromModification() {
return fromRevision;
} | Understands pipeline instance's reference to modifications | getFromModification | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public Modification getToModification() {
return toRevision;
} | Understands pipeline instance's reference to modifications | getToModification | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public String getMaterialName() {
return name;
} | Understands pipeline instance's reference to modifications | getMaterialName | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public String getFolder() {
return folder;
} | Understands pipeline instance's reference to modifications | getFolder | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public Long getMaterialId() {
return materialId;
} | Understands pipeline instance's reference to modifications | getMaterialId | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public long getPipelineId() {
return pipelineId;
} | Understands pipeline instance's reference to modifications | getPipelineId | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public void useMaterialRevision(MaterialRevision materialRevision) {
setFromModification(materialRevision.getOldestModification());
setToModification(materialRevision.getLatestModification());
recomputeFromModification(materialRevision.getMaterial());
} | Understands pipeline instance's reference to modifications | useMaterialRevision | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
private void setFromModification(Modification modification) {
this.fromRevision = modification;
} | Understands pipeline instance's reference to modifications | setFromModification | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
private void setToModification(Modification modification) {
this.toRevision = modification;
} | Understands pipeline instance's reference to modifications | setToModification | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public boolean getChanged() {
return changed;
} | Understands pipeline instance's reference to modifications | getChanged | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
public Long getActualFromRevisionId() {
return actualFromRevisionId;
} | Understands pipeline instance's reference to modifications | getActualFromRevisionId | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PipelineMaterialRevision that = (PipelineMaterialRevision) o;
if (changed != that.changed) {
... | Understands pipeline instance's reference to modifications | equals | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
@Override
public int hashCode() {
int result = name != null ? name.hashCode() : 0;
result = 31 * result + (folder != null ? folder.hashCode() : 0);
result = 31 * result + (int) (pipelineId ^ (pipelineId >>> 32));
result = 31 * result + (fromRevision != null ? fromRevision.hashCode() ... | Understands pipeline instance's reference to modifications | hashCode | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineMaterialRevision.java | Apache-2.0 |
@Override
public int compareTo(PipelineTimelineEntry o) {
if (o.getClass() != this.getClass()) {
throw new RuntimeException("Cannot compare '" + o + "' with '" + this + "'");
}
if (this.equals(o)) {
return 0;
}
Map<Date, TreeSet<Integer>> earlierMods ... | Understands a pipeline which can be compared based on its material checkin (natural) order | compareTo | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
public int getCounter() {
return counter;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | getCounter | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
private void populateEarlierModification(Map<Date, TreeSet<Integer>> earlierMods, Date thisDate, Date thatDate) {
int value = thisDate.before(thatDate) ? -1 : 1;
Date actual = thisDate.before(thatDate) ? thisDate : thatDate;
if (!earlierMods.containsKey(actual)) {
earlierMods.put(act... | Understands a pipeline which can be compared based on its material checkin (natural) order | populateEarlierModification | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
private boolean hasContentionOnEarliestMod(Map<Date, TreeSet<Integer>> earlierMods, Date earliestModDate) {
return earlierMods.get(earliestModDate).size() > 1;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | hasContentionOnEarliestMod | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
public PipelineTimelineEntry insertedBefore() {
return insertedBefore;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | insertedBefore | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
public PipelineTimelineEntry insertedAfter() {
return insertedAfter;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | insertedAfter | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
public void setInsertedBefore(PipelineTimelineEntry insertedBefore) {
if (this.insertedBefore != null) {
throw bomb("cannot change insertedBefore for: " + this + " with " + insertedBefore);
}
this.insertedBefore = insertedBefore;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | setInsertedBefore | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
public void setInsertedAfter(PipelineTimelineEntry insertedAfter) {
if (this.insertedAfter != null) {
throw bomb("cannot change insertedAfter for: " + this + " with " + insertedAfter);
}
this.insertedAfter = insertedAfter;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | setInsertedAfter | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
public String getPipelineName() {
return pipelineName;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | getPipelineName | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
public Long getId() {
return id;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | getId | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PipelineTimelineEntry that = (PipelineTimelineEntry) o;
return id == that.id;
} | Understands a pipeline which can be compared based on its material checkin (natural) order | equals | java | gocd/gocd | common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.