diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-04-12 22:52:58 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-04-12 22:52:58 +0200 |
commit | 8a4969c0db62ea95719c165639d872019a5f2e19 (patch) | |
tree | 01961b3336113623d8d57d75d0b58724dc6be035 /vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java | |
parent | c59810dece3adb914554079621ecae191236cf1b (diff) |
Guard metrics and GC unused code
Diffstat (limited to 'vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java')
-rwxr-xr-x | vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java b/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java index 3b84f83fafa..c08703c5061 100755 --- a/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java +++ b/vespaclient-core/src/main/java/com/yahoo/feedhandler/FeedResponse.java @@ -25,7 +25,6 @@ import java.util.List; import java.util.logging.Logger; import java.util.stream.Stream; -@SuppressWarnings("deprecation") public final class FeedResponse extends HttpResponse implements SharedSender.ResultCallback { private final static Logger log = Logger.getLogger(FeedResponse.class.getName()); @@ -37,7 +36,7 @@ public final class FeedResponse extends HttpResponse implements SharedSender.Res private boolean isAborted = false; private final SharedSender.Pending pendingNumber = new SharedSender.Pending(); - public FeedResponse(RouteMetricSet metrics) { + FeedResponse(RouteMetricSet metrics) { super(com.yahoo.jdisc.http.HttpResponse.Status.OK); this.metrics = metrics; } @@ -46,7 +45,7 @@ public final class FeedResponse extends HttpResponse implements SharedSender.Res return isAborted; } - public void setAbortOnFeedError(boolean abort) { + void setAbortOnFeedError(boolean abort) { abortOnError = abort; } @@ -88,7 +87,7 @@ public final class FeedResponse extends HttpResponse implements SharedSender.Res return "application/xml"; } - public String prettyPrint(Message m) { + private String prettyPrint(Message m) { if (m instanceof PutDocumentMessage) { return "PUT[" + ((PutDocumentMessage)m).getDocumentPut().getDocument().getId() + "] "; } @@ -138,17 +137,12 @@ public final class FeedResponse extends HttpResponse implements SharedSender.Res metrics.done(); } - public FeedResponse addXMLParseError(String error) { + FeedResponse addXMLParseError(String error) { errorMessages.add(ErrorMessage.createBadRequest(error)); errors.add(error); return this; } - public FeedResponse addError(String error) { - errorMessages.add(ErrorMessage.createBadRequest(error)); - errors.add(error); - return this; - } public FeedResponse addError(com.yahoo.container.protect.Error code, String error) { errorMessages.add(new ErrorMessage(code.code, error)); errors.add(error); @@ -159,10 +153,6 @@ public final class FeedResponse extends HttpResponse implements SharedSender.Res return errors; } - public List<ErrorMessage> getErrorMessageList() { - return errorMessages; - } - private static boolean containsFatalErrors(Stream<Error> errors) { return errors.anyMatch(e -> e.getCode() != DocumentProtocol.ERROR_TEST_AND_SET_CONDITION_FAILED); } |