summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-03-02 02:00:41 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-03-08 21:38:37 +0000
commitbe9df8bfa22cf5a7164f4f3deba44cdbd2b8e7cf (patch)
treef4a9153a9613f375f3a7dc15fb274a528a1269ed /storageapi
parent72e9888bcccbc384d2485409ba055633131ed512 (diff)
Implement a default destructor to avoid the automatic inlining of large destructors.
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.cpp26
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.h17
2 files changed, 38 insertions, 5 deletions
diff --git a/storageapi/src/vespa/storageapi/message/persistence.cpp b/storageapi/src/vespa/storageapi/message/persistence.cpp
index 95466138e18..6de53d9db82 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.cpp
+++ b/storageapi/src/vespa/storageapi/message/persistence.cpp
@@ -4,7 +4,6 @@
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/stllike/asciistream.h>
-
namespace storage {
namespace api {
@@ -19,6 +18,11 @@ IMPLEMENT_REPLY(RemoveReply)
IMPLEMENT_COMMAND(RevertCommand, RevertReply)
IMPLEMENT_REPLY(RevertReply)
+TestAndSetCommand::TestAndSetCommand(const MessageType & messageType, const document::BucketId & id)
+ : BucketInfoCommand(messageType, id)
+{}
+TestAndSetCommand::~TestAndSetCommand() { }
+
PutCommand::PutCommand(const document::BucketId& id,
const document::Document::SP& doc, Timestamp time)
: TestAndSetCommand(MessageType::PUT, id),
@@ -32,6 +36,8 @@ PutCommand::PutCommand(const document::BucketId& id,
}
}
+PutCommand::~PutCommand() {}
+
StorageCommand::UP
PutCommand::createCopyToForward(
const document::BucketId& bucket, uint64_t timestamp) const
@@ -78,6 +84,8 @@ PutReply::PutReply(const PutCommand& cmd, bool wasFoundFlag)
{
}
+PutReply::~PutReply() {}
+
void
PutReply::print(std::ostream& out, bool verbose,
const std::string& indent) const
@@ -111,6 +119,8 @@ UpdateCommand::UpdateCommand(const document::BucketId& id,
}
}
+UpdateCommand::~UpdateCommand() {}
+
vespalib::string
UpdateCommand::getSummary() const {
vespalib::asciistream stream;
@@ -161,6 +171,8 @@ UpdateReply::UpdateReply(const UpdateCommand& cmd, Timestamp oldTimestamp)
{
}
+UpdateReply::~UpdateReply() {}
+
void
UpdateReply::print(std::ostream& out, bool verbose,
const std::string& indent) const
@@ -191,6 +203,8 @@ GetCommand::GetCommand(const document::BucketId& bid,
{
}
+GetCommand::~GetCommand() {}
+
StorageCommand::UP
GetCommand::createCopyToForward(
const document::BucketId& bucket, uint64_t timestamp) const
@@ -237,6 +251,8 @@ GetReply::GetReply(const GetCommand& cmd,
{
}
+GetReply::~GetReply() {}
+
void
GetReply::print(std::ostream& out, bool verbose,
const std::string& indent) const
@@ -258,6 +274,8 @@ RemoveCommand::RemoveCommand(const document::BucketId& bid,
{
}
+RemoveCommand::~RemoveCommand() {}
+
StorageCommand::UP
RemoveCommand::createCopyToForward(
const document::BucketId& bucket, uint64_t timestamp) const
@@ -294,6 +312,8 @@ RemoveReply::RemoveReply(const RemoveCommand& cmd, Timestamp oldTimestamp)
{
}
+RemoveReply::~RemoveReply() {}
+
void
RemoveReply::print(std::ostream& out, bool verbose,
const std::string& indent) const
@@ -319,6 +339,8 @@ RevertCommand::RevertCommand(const document::BucketId& id,
{
}
+RevertCommand::~RevertCommand() {}
+
void
RevertCommand::print(std::ostream& out, bool verbose,
const std::string& indent) const
@@ -343,6 +365,8 @@ RevertReply::RevertReply(const RevertCommand& cmd)
{
}
+RevertReply::~RevertReply() {}
+
void
RevertReply::print(std::ostream& out, bool verbose,
const std::string& indent) const
diff --git a/storageapi/src/vespa/storageapi/message/persistence.h b/storageapi/src/vespa/storageapi/message/persistence.h
index acccb3f9deb..d0961266cfe 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.h
+++ b/storageapi/src/vespa/storageapi/message/persistence.h
@@ -22,8 +22,8 @@ class TestAndSetCommand : public BucketInfoCommand {
TestAndSetCondition _condition;
public:
- TestAndSetCommand(const MessageType & messageType, const document::BucketId & id)
- : BucketInfoCommand(messageType, id) {}
+ TestAndSetCommand(const MessageType & messageType, const document::BucketId & id);
+ ~TestAndSetCommand();
void setCondition(const TestAndSetCondition & condition) { _condition = condition; }
const TestAndSetCondition & getCondition() const { return _condition; }
@@ -47,8 +47,8 @@ class PutCommand : public TestAndSetCommand {
Timestamp _updateTimestamp;
public:
- PutCommand(const document::BucketId&, const document::Document::SP&,
- Timestamp);
+ PutCommand(const document::BucketId&, const document::Document::SP&, Timestamp);
+ ~PutCommand();
void setTimestamp(Timestamp ts) { _timestamp = ts; }
@@ -94,6 +94,7 @@ class PutReply : public BucketInfoReply {
public:
explicit PutReply(const PutCommand& cmd, bool wasFound = true);
+ ~PutReply();
const document::DocumentId& getDocumentId() const { return _docId; }
bool hasDocument() const { return _document.get(); }
@@ -124,6 +125,7 @@ class UpdateCommand : public TestAndSetCommand {
public:
UpdateCommand(const document::BucketId&,
const document::DocumentUpdate::SP&, Timestamp);
+ ~UpdateCommand();
void setTimestamp(Timestamp ts) { _timestamp = ts; }
void setOldTimestamp(Timestamp ts) { _oldTimestamp = ts; }
@@ -163,6 +165,7 @@ class UpdateReply : public BucketInfoReply {
public:
UpdateReply(const UpdateCommand& cmd, Timestamp oldTimestamp = 0);
+ ~UpdateReply();
void setOldTimestamp(Timestamp ts) { _oldTimestamp = ts; }
@@ -205,6 +208,7 @@ class GetCommand : public BucketInfoCommand {
public:
GetCommand(const document::BucketId&, const document::DocumentId&,
const vespalib::stringref & fieldSet, Timestamp before = MAX_TIMESTAMP);
+ ~GetCommand();
void setBeforeTimestamp(Timestamp ts) { _beforeTimestamp = ts; }
@@ -240,6 +244,7 @@ public:
GetReply(const GetCommand& cmd,
const document::Document::SP& doc = document::Document::SP(),
Timestamp lastModified = 0);
+ ~GetReply();
const document::Document::SP& getDocument() const { return _doc; }
const document::DocumentId& getDocumentId() const { return _docId; }
@@ -273,6 +278,7 @@ class RemoveCommand : public TestAndSetCommand {
public:
RemoveCommand(const document::BucketId&, const document::DocumentId& docId,
Timestamp timestamp);
+ ~RemoveCommand();
void setTimestamp(Timestamp ts) { _timestamp = ts; }
@@ -302,6 +308,7 @@ class RemoveReply : public BucketInfoReply {
public:
explicit RemoveReply(const RemoveCommand& cmd, Timestamp oldTimestamp = 0);
+ ~RemoveReply();
const document::DocumentId& getDocumentId() const { return _docId; }
Timestamp getTimestamp() { return _timestamp; };
@@ -329,6 +336,7 @@ class RevertCommand : public BucketInfoCommand {
public:
RevertCommand(const document::BucketId& bucket,
const std::vector<Timestamp>& revertTokens);
+ ~RevertCommand();
const std::vector<Timestamp>& getRevertTokens() const { return _tokens; }
@@ -349,6 +357,7 @@ class RevertReply : public BucketInfoReply {
public:
explicit RevertReply(const RevertCommand& cmd);
+ ~RevertReply();
const std::vector<Timestamp>& getRevertTokens() const { return _tokens; }