summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-02-28 15:45:29 +0100
committerGitHub <noreply@github.com>2023-02-28 15:45:29 +0100
commitdc8610577e39510914afab337538d233dc6e4832 (patch)
tree23a846f936543aa3ab37c6384bc5ed52d02bdc8f /storage
parent98167b26a57e9413bf2d4ea71e99228a825432b9 (diff)
parentddd8f0e9a70aa1099133bc6893ca7c488653bb5b (diff)
Merge pull request #26227 from vespa-engine/balder/remove-fastos-types
Remove fastos/types.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storageapi/mbusprot/serializationhelper.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/storage/src/vespa/storageapi/mbusprot/serializationhelper.h b/storage/src/vespa/storageapi/mbusprot/serializationhelper.h
index 457a6178704..671ffbddd6f 100644
--- a/storage/src/vespa/storageapi/mbusprot/serializationhelper.h
+++ b/storage/src/vespa/storageapi/mbusprot/serializationhelper.h
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fastos/types.h>
#include <vespa/document/base/globalid.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/document/util/bytebuffer.h>
@@ -13,12 +12,6 @@ namespace storage::mbusprot {
class SerializationHelper
{
public:
- static int64_t getLong(document::ByteBuffer& buf) {
- int64_t tmp;
- buf.getLongNetwork(tmp);
- return tmp;
- }
-
static int32_t getInt(document::ByteBuffer& buf) {
int32_t tmp;
buf.getIntNetwork(tmp);
@@ -46,26 +39,6 @@ public:
return s;
}
- static bool getBoolean(document::ByteBuffer& buf) {
- uint8_t tmp;
- buf.getByte(tmp);
- return (tmp == 1);
- }
-
- static api::ReturnCode getReturnCode(document::ByteBuffer& buf) {
- api::ReturnCode::Result result = (api::ReturnCode::Result) getInt(buf);
- vespalib::stringref message = getString(buf);
- return api::ReturnCode(result, message);
- }
-
- static void putReturnCode(const api::ReturnCode& code, vespalib::GrowableByteBuffer& buf)
- {
- buf.putInt(code.getResult());
- buf.putString(code.getMessage());
- }
-
- static const uint32_t BUCKET_INFO_SERIALIZED_SIZE = sizeof(uint32_t) * 3;
-
static document::GlobalId getGlobalId(document::ByteBuffer& buf) {
std::vector<char> buffer(getShort(buf));
for (uint32_t i=0; i<buffer.size(); ++i) {
@@ -74,13 +47,6 @@ public:
return document::GlobalId(&buffer[0]);
}
- static void putGlobalId(const document::GlobalId& gid, vespalib::GrowableByteBuffer& buf)
- {
- buf.putShort(document::GlobalId::LENGTH);
- for (uint32_t i=0; i<document::GlobalId::LENGTH; ++i) {
- buf.putByte(gid.get()[i]);
- }
- }
static document::Document::UP getDocument(document::ByteBuffer& buf, const document::DocumentTypeRepo& repo)
{
uint32_t size = getInt(buf);