summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/prelude/Pong.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/Pong.java')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/Pong.java31
1 files changed, 2 insertions, 29 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/Pong.java b/container-search/src/main/java/com/yahoo/prelude/Pong.java
index a6bc3e7975d..a60fba9a4f7 100644
--- a/container-search/src/main/java/com/yahoo/prelude/Pong.java
+++ b/container-search/src/main/java/com/yahoo/prelude/Pong.java
@@ -1,7 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude;
-import com.yahoo.fs4.PongPacket;
import com.yahoo.search.result.ErrorMessage;
import com.yahoo.search.statistics.ElapsedTime;
@@ -19,28 +18,19 @@ public class Pong {
private String pingInfo="";
private final List<ErrorMessage> errors = new ArrayList<>(1);
- private final Optional<PongPacket> pongPacket;
private ElapsedTime elapsed = new ElapsedTime();
private final Optional<Long> activeDocuments;
public Pong() {
- this.pongPacket = Optional.empty();
this.activeDocuments = Optional.empty();
}
public Pong(ErrorMessage error) {
errors.add(error);
- this.pongPacket = Optional.empty();
- this.activeDocuments = Optional.empty();
- }
-
- public Pong(PongPacket pongPacket) {
- this.pongPacket = Optional.of(pongPacket);
this.activeDocuments = Optional.empty();
}
public Pong(long activeDocuments) {
- this.pongPacket = Optional.empty();
this.activeDocuments = Optional.of(activeDocuments);
}
@@ -52,21 +42,14 @@ public class Pong {
return errors.get(i);
}
- public int getErrorSize() {
- return errors.size();
- }
-
/** Returns the number of active documents in the backend responding in this Pong, if available */
public Optional<Long> activeDocuments() {
- if (activeDocuments.isPresent()) return activeDocuments;
- if ( ! pongPacket.isPresent()) return Optional.empty();
- return pongPacket.get().getActiveDocuments();
+ return activeDocuments;
}
/** Returns the number of nodes which responded to this Pong, if available */
public Optional<Integer> activeNodes() {
- if ( ! pongPacket.isPresent()) return Optional.empty();
- return pongPacket.get().getActiveNodes();
+ return Optional.empty();
}
public List<ErrorMessage> getErrors() {
@@ -78,16 +61,6 @@ public class Pong {
return ! errors.isEmpty();
}
- /** Sets information about the ping used to produce this. This is included when returning the tostring of this. */
- public void setPingInfo(String pingInfo) {
- if (pingInfo==null)
- pingInfo="";
- this.pingInfo=pingInfo;
- }
-
- /** Returns information about the ping use, or "" (never null) if none */
- public String getPingInfo() { return pingInfo; }
-
public ElapsedTime getElapsedTime() {
return elapsed;
}