summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2017-10-16 21:01:19 +0200
committerTor Egge <Tor.Egge@oath.com>2017-10-17 09:34:12 +0000
commitdde45a05b010b6de1c62643cd9ecd37c091fdba9 (patch)
tree0b8d1687170f69bb15c8dc1a5b11b01a52fc2615 /storageapi
parentd090dc6fc5fbf34c4a6f207cb796275c22dffa45 (diff)
Remove createCopyToForward() methods, they are not used.
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.cpp36
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.h5
-rw-r--r--storageapi/src/vespa/storageapi/message/stat.cpp8
-rw-r--r--storageapi/src/vespa/storageapi/message/stat.h1
-rw-r--r--storageapi/src/vespa/storageapi/message/visitor.cpp10
-rw-r--r--storageapi/src/vespa/storageapi/message/visitor.h2
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagecommand.cpp8
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagecommand.h9
8 files changed, 0 insertions, 79 deletions
diff --git a/storageapi/src/vespa/storageapi/message/persistence.cpp b/storageapi/src/vespa/storageapi/message/persistence.cpp
index d61bfc8c24d..ffb284012fb 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.cpp
+++ b/storageapi/src/vespa/storageapi/message/persistence.cpp
@@ -39,15 +39,6 @@ PutCommand::PutCommand(const document::BucketId& id,
PutCommand::~PutCommand() {}
-StorageCommand::UP
-PutCommand::createCopyToForward(
- const document::BucketId& bucket, uint64_t timestamp) const
-{
- StorageCommand::UP cmd(new PutCommand(bucket, _doc, timestamp));
- static_cast<PutCommand&>(*cmd).setUpdateTimestamp(_updateTimestamp);
- return cmd;
-}
-
vespalib::string
PutCommand::getSummary() const
{
@@ -154,15 +145,6 @@ UpdateCommand::print(std::ostream& out, bool verbose,
}
}
-StorageCommand::UP
-UpdateCommand::createCopyToForward(
- const document::BucketId& bucket, uint64_t timestamp) const
-{
- StorageCommand::UP cmd(new UpdateCommand(bucket, _update, timestamp));
- static_cast<UpdateCommand&>(*cmd).setOldTimestamp(_oldTimestamp);
- return cmd;
-}
-
UpdateReply::UpdateReply(const UpdateCommand& cmd, Timestamp oldTimestamp)
: BucketInfoReply(cmd),
_docId(cmd.getDocumentId()),
@@ -206,16 +188,6 @@ GetCommand::GetCommand(const document::BucketId& bid,
GetCommand::~GetCommand() {}
-StorageCommand::UP
-GetCommand::createCopyToForward(
- const document::BucketId& bucket, uint64_t timestamp) const
-{
- (void) timestamp;
- StorageCommand::UP cmd(new GetCommand(
- bucket, _docId, _fieldSet, _beforeTimestamp));
- return cmd;
-}
-
vespalib::string
GetCommand::getSummary() const
{
@@ -277,14 +249,6 @@ RemoveCommand::RemoveCommand(const document::BucketId& bid,
RemoveCommand::~RemoveCommand() {}
-StorageCommand::UP
-RemoveCommand::createCopyToForward(
- const document::BucketId& bucket, uint64_t timestamp) const
-{
- StorageCommand::UP cmd(new RemoveCommand(bucket, _docId, timestamp));
- return cmd;
-}
-
vespalib::string
RemoveCommand::getSummary() const {
vespalib::asciistream stream;
diff --git a/storageapi/src/vespa/storageapi/message/persistence.h b/storageapi/src/vespa/storageapi/message/persistence.h
index 9e6e0491237..9add004c730 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.h
+++ b/storageapi/src/vespa/storageapi/message/persistence.h
@@ -69,7 +69,6 @@ public:
}
vespalib::string getSummary() const override;
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- StorageCommand::UP createCopyToForward(const document::BucketId& bucket, uint64_t timestamp) const override;
DECLARE_STORAGECOMMAND(PutCommand, onPut);
};
@@ -137,7 +136,6 @@ public:
vespalib::string getSummary() const override;
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- StorageCommand::UP createCopyToForward(const document::BucketId& bucket, uint64_t timestamp) const override;
DECLARE_STORAGECOMMAND(UpdateCommand, onUpdate);
};
@@ -208,8 +206,6 @@ public:
vespalib::string getSummary() const override;
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- StorageCommand::UP createCopyToForward(const document::BucketId& bucket, uint64_t timestamp) const override;
-
DECLARE_STORAGECOMMAND(GetCommand, onGet)
};
@@ -266,7 +262,6 @@ public:
Timestamp getTimestamp() const { return _timestamp; }
vespalib::string getSummary() const override;
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- StorageCommand::UP createCopyToForward(const document::BucketId& bucket, uint64_t timestamp) const override;
DECLARE_STORAGECOMMAND(RemoveCommand, onRemove)
};
diff --git a/storageapi/src/vespa/storageapi/message/stat.cpp b/storageapi/src/vespa/storageapi/message/stat.cpp
index 1f7080d8de8..7c8a5541313 100644
--- a/storageapi/src/vespa/storageapi/message/stat.cpp
+++ b/storageapi/src/vespa/storageapi/message/stat.cpp
@@ -32,14 +32,6 @@ StatBucketCommand::print(std::ostream& out, bool verbose,
}
}
-StorageCommand::UP
-StatBucketCommand::createCopyToForward(
- const document::BucketId& bucket, uint64_t) const
-{
- StatBucketCommand::UP cmd(new StatBucketCommand(bucket, _docSelection));
- return std::move(cmd);
-}
-
StatBucketReply::StatBucketReply(const StatBucketCommand& cmd,
const vespalib::stringref & results)
: BucketReply(cmd),
diff --git a/storageapi/src/vespa/storageapi/message/stat.h b/storageapi/src/vespa/storageapi/message/stat.h
index 92a3a847eea..4bff4b5a823 100644
--- a/storageapi/src/vespa/storageapi/message/stat.h
+++ b/storageapi/src/vespa/storageapi/message/stat.h
@@ -27,7 +27,6 @@ public:
const vespalib::string& getDocumentSelection() const { return _docSelection; }
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- StorageCommand::UP createCopyToForward(const document::BucketId&, uint64_t timestamp) const override;
DECLARE_STORAGECOMMAND(StatBucketCommand, onStatBucket);
};
diff --git a/storageapi/src/vespa/storageapi/message/visitor.cpp b/storageapi/src/vespa/storageapi/message/visitor.cpp
index 851896f4d55..8c10eb501b2 100644
--- a/storageapi/src/vespa/storageapi/message/visitor.cpp
+++ b/storageapi/src/vespa/storageapi/message/visitor.cpp
@@ -65,16 +65,6 @@ CreateVisitorCommand::CreateVisitorCommand(const CreateVisitorCommand& o)
CreateVisitorCommand::~CreateVisitorCommand() {}
-StorageCommand::UP
-CreateVisitorCommand::createCopyToForward(
- const document::BucketId& bucket, uint64_t) const
-{
- CreateVisitorCommand::UP cmd(new CreateVisitorCommand(*this));
- cmd->_buckets.clear();
- cmd->_buckets.push_back(bucket);
- return std::move(cmd);
-}
-
void
CreateVisitorCommand::print(std::ostream& out, bool verbose,
const std::string& indent) const
diff --git a/storageapi/src/vespa/storageapi/message/visitor.h b/storageapi/src/vespa/storageapi/message/visitor.h
index a0d2fa1ee57..3d659831351 100644
--- a/storageapi/src/vespa/storageapi/message/visitor.h
+++ b/storageapi/src/vespa/storageapi/message/visitor.h
@@ -113,8 +113,6 @@ public:
uint32_t getMaxBucketsPerVisitor() const { return _maxBucketsPerVisitor; }
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- StorageCommand::UP createCopyToForward(const document::BucketId&, uint64_t timestamp) const override;
-
DECLARE_STORAGECOMMAND(CreateVisitorCommand, onCreateVisitor)
};
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagecommand.cpp b/storageapi/src/vespa/storageapi/messageapi/storagecommand.cpp
index 0028de9924a..fe33066872a 100644
--- a/storageapi/src/vespa/storageapi/messageapi/storagecommand.cpp
+++ b/storageapi/src/vespa/storageapi/messageapi/storagecommand.cpp
@@ -40,12 +40,4 @@ StorageCommand::print(std::ostream& out, bool verbose,
out << ")";
}
-StorageCommand::UP
-StorageCommand::createCopyToForward(const document::BucketId&, uint64_t) const
-{
- throw vespalib::IllegalStateException(
- "Command " + _type.getName() + " does not support forwarding.",
- VESPA_STRLOC);
-}
-
}
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagecommand.h b/storageapi/src/vespa/storageapi/messageapi/storagecommand.h
index 5667c5c10f4..2885dac3b91 100644
--- a/storageapi/src/vespa/storageapi/messageapi/storagecommand.h
+++ b/storageapi/src/vespa/storageapi/messageapi/storagecommand.h
@@ -53,15 +53,6 @@ public:
* taking command as input.
*/
virtual std::unique_ptr<StorageReply> makeReply() = 0;
-
- /**
- * Distributors need a way to create copies of messages to send to forward
- * to different nodes. Only messages sent through the distributor needs to
- * have an actual implementation of this.
- */
- virtual StorageCommand::UP createCopyToForward(
- const document::BucketId& bucket, uint64_t timestamp) const;
-
};
}