aboutsummaryrefslogtreecommitdiffstats
path: root/storageapi/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-01-14 14:56:03 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-01-14 14:56:03 +0000
commit80835efd5c385b6f8e19212a7c032e57af1fd73d (patch)
tree8dc193f8ef1db5ac6f41d3b3266c8f87dc06cfd7 /storageapi/src
parenta772cb05a682fd05fabd0d571417ec7976d0165d (diff)
Remove virtuality of DocumentId.
Diffstat (limited to 'storageapi/src')
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/storageapi/src/vespa/storageapi/message/persistence.cpp b/storageapi/src/vespa/storageapi/message/persistence.cpp
index 8bd4f648f30..2ab73236ca6 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.cpp
+++ b/storageapi/src/vespa/storageapi/message/persistence.cpp
@@ -31,7 +31,7 @@ PutCommand::PutCommand(const document::Bucket &bucket, const DocumentSP& doc, Ti
_timestamp(time),
_updateTimestamp(0)
{
- if (_doc.get() == 0) {
+ if ( !_doc ) {
throw vespalib::IllegalArgumentException("Cannot put a null document", VESPA_STRLOC);
}
}
@@ -58,7 +58,7 @@ PutCommand::getSummary() const
void
PutCommand::print(std::ostream& out, bool verbose, const std::string& indent) const
{
- out << "Put(" << getBucketId() << ", " << _doc->getId()
+ out << "Put(" << getBucketId() << ", " << _doc->getId().toString()
<< ", timestamp " << _timestamp << ", size "
<< _doc->serialize()->getLength() << ")";
if (verbose) {
@@ -104,7 +104,7 @@ UpdateCommand::UpdateCommand(const document::Bucket &bucket, const document::Doc
_timestamp(time),
_oldTimestamp(0)
{
- if (_update.get() == 0) {
+ if ( ! _update) {
throw vespalib::IllegalArgumentException("Cannot update a null update", VESPA_STRLOC);
}
}
@@ -132,7 +132,7 @@ UpdateCommand::getSummary() const {
void
UpdateCommand::print(std::ostream& out, bool verbose, const std::string& indent) const
{
- out << "Update(" << getBucketId() << ", " << _update->getId() << ", timestamp " << _timestamp;
+ out << "Update(" << getBucketId() << ", " << _update->getId().toString() << ", timestamp " << _timestamp;
if (_oldTimestamp != 0) {
out << ", old timestamp " << _oldTimestamp;
}
@@ -200,7 +200,7 @@ GetCommand::getSummary() const
void
GetCommand::print(std::ostream& out, bool verbose, const std::string& indent) const
{
- out << "Get(" << getBucketId() << ", " << _docId << ")";
+ out << "Get(" << getBucketId() << ", " << _docId.toString() << ")";
if (verbose) {
out << " : ";
BucketCommand::print(out, verbose, indent);
@@ -226,7 +226,7 @@ GetReply::~GetReply() = default;
void
GetReply::print(std::ostream& out, bool verbose, const std::string& indent) const
{
- out << "GetReply(" << getBucketId() << ", " << _docId << ", timestamp " << _lastModifiedTime << ")";
+ out << "GetReply(" << getBucketId() << ", " << _docId.toString() << ", timestamp " << _lastModifiedTime << ")";
if (verbose) {
out << " : ";
BucketReply::print(out, verbose, indent);
@@ -253,7 +253,7 @@ RemoveCommand::getSummary() const {
void
RemoveCommand::print(std::ostream& out, bool verbose, const std::string& indent) const
{
- out << "Remove(" << getBucketId() << ", " << _docId << ", timestamp " << _timestamp << ")";
+ out << "Remove(" << getBucketId() << ", " << _docId.toString() << ", timestamp " << _timestamp << ")";
if (verbose) {
out << " : ";
BucketInfoCommand::print(out, verbose, indent);
@@ -273,7 +273,7 @@ RemoveReply::~RemoveReply() = default;
void
RemoveReply::print(std::ostream& out, bool verbose, const std::string& indent) const
{
- out << "RemoveReply(" << getBucketId() << ", " << _docId << ", timestamp " << _timestamp;
+ out << "RemoveReply(" << getBucketId() << ", " << _docId.toString() << ", timestamp " << _timestamp;
if (_oldTimestamp != 0) {
out << ", removed doc from " << _oldTimestamp;
} else {
@@ -300,8 +300,8 @@ RevertCommand::print(std::ostream& out, bool verbose, const std::string& indent)
out << "Revert(" << getBucketId();
if (verbose) {
out << ",";
- for (uint32_t i=0; i<_tokens.size(); ++i) {
- out << "\n" << indent << " " << _tokens[i];
+ for (Timestamp token : _tokens) {
+ out << "\n" << indent << " " << token;
}
}
out << ")";