diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2021-01-28 08:31:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 08:31:04 +0100 |
commit | 2e2e2edeb3ea99f2c04925070cf44601e2cd94fb (patch) | |
tree | 51b8ba2272b299ab676cdae6e04b3f050979ac12 /vespaclient-container-plugin/src | |
parent | e4a2b4d09f15ef07c41c35520a23e0970895b2aa (diff) |
Revert "Jonmv/reapply document protocol super config [run-systemtest]"
Diffstat (limited to 'vespaclient-container-plugin/src')
-rw-r--r-- | vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedErrorMessage.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedErrorMessage.java b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedErrorMessage.java new file mode 100644 index 00000000000..1d7e8535909 --- /dev/null +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedErrorMessage.java @@ -0,0 +1,43 @@ +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.http.server; + +import com.yahoo.document.DocumentId; +import com.yahoo.messagebus.Message; +import com.yahoo.text.Utf8String; + +import java.util.Arrays; + +public class FeedErrorMessage extends Message { + + private long sequenceId; + + public FeedErrorMessage(String operationId) { + try { + DocumentId id = new DocumentId(operationId); + sequenceId = Arrays.hashCode(id.getGlobalId()); + } catch (Exception e) { + sequenceId = 0; + } + } + + @Override + public Utf8String getProtocol() { + return new Utf8String("vespa-feed-handler-internal-bogus-protocol"); + } + + @Override + public int getType() { + return 1234; + } + + @Override + public boolean hasSequenceId() { + return true; + } + + @Override + public long getSequenceId() { + return sequenceId; + } + +} |