diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-03-22 13:40:31 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-03-22 13:48:05 +0000 |
commit | ad0c199d5907794aae0e5b11068efcf338ee0c6d (patch) | |
tree | a0a507d2a8341fb8170408da6d2bb4167f229caa /storage | |
parent | cb4236502fb0fefbb86654f0a8252def90b15bc0 (diff) |
Rename functions that are part of DistributorNodeContext interface.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe_component.cpp | 15 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe_component.h | 11 |
2 files changed, 14 insertions, 12 deletions
diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp b/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp index a153b1d90c1..5e9f717fc7f 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp +++ b/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp @@ -45,12 +45,6 @@ const lib::ClusterStateBundle& DistributorStripeComponent::getClusterStateBundle() const { return _distributor.getClusterStateBundle(); -}; - -api::StorageMessageAddress -DistributorStripeComponent::nodeAddress(uint16_t nodeIndex) const -{ - return api::StorageMessageAddress::create(cluster_name_ptr(), lib::NodeType::STORAGE, nodeIndex); } bool @@ -290,6 +284,15 @@ DistributorStripeComponent::createAppropriateBucket(const document::Bucket &buck bucket.getBucketId()); } +// Implements DistributorNodeContext +api::StorageMessageAddress +DistributorStripeComponent::node_address(uint16_t node_index) const noexcept +{ + return api::StorageMessageAddress::create(cluster_name_ptr(), lib::NodeType::STORAGE, node_index); +} + + +// Implements DistributorOperationContext bool DistributorStripeComponent::has_pending_message(uint16_t node_index, const document::Bucket& bucket, diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_component.h b/storage/src/vespa/storage/distributor/distributor_stripe_component.h index 994af741e73..892d3c8cb62 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe_component.h +++ b/storage/src/vespa/storage/distributor/distributor_stripe_component.h @@ -49,11 +49,6 @@ public: const lib::ClusterStateBundle& getClusterStateBundle() const; /** - * Returns the slobrok address of the given storage node. - */ - api::StorageMessageAddress nodeAddress(uint16_t nodeIndex) const; - - /** * Returns true if the given storage node is in an "up state". */ bool storageNodeIsUp(document::BucketSpace bucketSpace, uint32_t nodeIndex) const; @@ -145,7 +140,11 @@ public: const vespalib::string * cluster_name_ptr() const noexcept override { return cluster_context().cluster_name_ptr(); } const document::BucketIdFactory& bucket_id_factory() const noexcept override { return getBucketIdFactory(); } uint16_t node_index() const noexcept override { return getIndex(); } - api::StorageMessageAddress node_address(uint16_t node_index) const noexcept override { return nodeAddress(node_index); } + + /** + * Returns the slobrok address of the given storage node. + */ + api::StorageMessageAddress node_address(uint16_t node_index) const noexcept override; // Implements DistributorOperationContext api::Timestamp generate_unique_timestamp() override { return getUniqueTimestamp(); } |