summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-07-01 08:07:35 +0200
committerHarald Musum <musum@verizonmedia.com>2020-07-01 08:07:35 +0200
commitf96a67f299b8dea170ffe7b08a67f42d9899dbfc (patch)
treeabfb707b9e96dfbf7d99f4edfc8715532a076f7d
parent57443a7b09bab41cd4c2d8be3b898d244d0df94c (diff)
Update/remove comments and javadoc
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/PrepareParams.java2
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java20
2 files changed, 9 insertions, 13 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/PrepareParams.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/PrepareParams.java
index 2e101762fc4..fa1d90e0fb1 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/PrepareParams.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/PrepareParams.java
@@ -22,7 +22,7 @@ import java.util.List;
import java.util.Optional;
/**
- * Parameters for prepare. Immutable.
+ * Parameters for preparing an application. Immutable.
*
* @author Ulf Lilleengen
*/
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java
index 1e832548342..3643b237d7e 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/Session.java
@@ -17,9 +17,10 @@ import java.util.Optional;
/**
* A session represents an instance of an application that can be edited, prepared and activated. This
* class represents the common stuff between sessions working on the local file
- * system ({@link LocalSession}s) and sessions working on zookeeper {@link RemoteSession}s.
+ * system ({@link LocalSession}s) and sessions working on zookeeper ({@link RemoteSession}s).
*
* @author Ulf Lilleengen
+ * @author hmusum
*/
public abstract class Session implements Comparable<Session> {
@@ -32,10 +33,7 @@ public abstract class Session implements Comparable<Session> {
this.sessionId = sessionId;
this.sessionZooKeeperClient = sessionZooKeeperClient;
}
- /**
- * Retrieve the session id for this session.
- * @return the session id.
- */
+
public final long getSessionId() {
return sessionId;
}
@@ -50,7 +48,7 @@ public abstract class Session implements Comparable<Session> {
}
/**
- * Represents the status of this session.
+ * The status of this session.
*/
public enum Status {
NEW, PREPARE, ACTIVATE, DEACTIVATE, DELETE, NONE;
@@ -72,11 +70,9 @@ public abstract class Session implements Comparable<Session> {
* @return log preamble
*/
public String logPre() {
- if (getApplicationId().equals(ApplicationId.defaultId())) {
- return TenantRepository.logPre(getTenantName());
- } else {
- return TenantRepository.logPre(getApplicationId());
- }
+ return getApplicationId().equals(ApplicationId.defaultId())
+ ? TenantRepository.logPre(getTenantName())
+ : TenantRepository.logPre(getApplicationId());
}
public Instant getCreateTime() {
@@ -89,7 +85,7 @@ public abstract class Session implements Comparable<Session> {
void setApplicationPackageReference(FileReference applicationPackageReference) {
if (applicationPackageReference == null) throw new IllegalArgumentException(String.format(
- "Null application package FileReference for tenant: %s, session: %d", tenant, sessionId));
+ "Null application package file reference for tenant %s, session id %d", tenant, sessionId));
sessionZooKeeperClient.writeApplicationPackageReference(applicationPackageReference);
}