File tree Expand file tree Collapse file tree
server-sdk-dynamodb-source
include/launchdarkly/server_side/integrations/dynamodb
include/launchdarkly/server_side/integrations/redis
include/launchdarkly/server_side/integrations/big_segments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ class DynamoDBBigSegmentStore final : public IBigSegmentStore {
6161 DynamoDBClientOptions options = {});
6262
6363 [[nodiscard]] GetMembershipResult GetMembership (
64- std::string const & context_hash) const override ;
65- [[nodiscard]] GetMetadataResult GetMetadata () const override ;
64+ std::string const & context_hash) const noexcept override ;
65+ [[nodiscard]] GetMetadataResult GetMetadata () const noexcept override ;
6666
6767 ~DynamoDBBigSegmentStore () override ;
6868
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ DynamoDBBigSegmentStore::DynamoDBBigSegmentStore(
6464DynamoDBBigSegmentStore::~DynamoDBBigSegmentStore () = default ;
6565
6666IBigSegmentStore::GetMembershipResult DynamoDBBigSegmentStore::GetMembership (
67- std::string const & context_hash) const {
67+ std::string const & context_hash) const noexcept {
6868 Aws::DynamoDB::Model::GetItemRequest request;
6969 request.SetTableName (table_name_);
7070 request.SetConsistentRead (true );
@@ -114,7 +114,7 @@ IBigSegmentStore::GetMembershipResult DynamoDBBigSegmentStore::GetMembership(
114114}
115115
116116IBigSegmentStore::GetMetadataResult DynamoDBBigSegmentStore::GetMetadata ()
117- const {
117+ const noexcept {
118118 Aws::DynamoDB::Model::GetItemRequest request;
119119 request.SetTableName (table_name_);
120120 request.SetConsistentRead (true );
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ class RedisBigSegmentStore final : public IBigSegmentStore {
5555 Create (std::string uri, std::string prefix);
5656
5757 [[nodiscard]] GetMembershipResult GetMembership (
58- std::string const & context_hash) const override ;
59- [[nodiscard]] GetMetadataResult GetMetadata () const override ;
58+ std::string const & context_hash) const noexcept override ;
59+ [[nodiscard]] GetMetadataResult GetMetadata () const noexcept override ;
6060
6161 ~RedisBigSegmentStore () override ;
6262
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ RedisBigSegmentStore::RedisBigSegmentStore(
5757RedisBigSegmentStore::~RedisBigSegmentStore () = default ;
5858
5959IBigSegmentStore::GetMembershipResult RedisBigSegmentStore::GetMembership (
60- std::string const & context_hash) const {
60+ std::string const & context_hash) const noexcept {
6161 std::string const include_key = include_key_prefix_ + context_hash;
6262 std::string const exclude_key = exclude_key_prefix_ + context_hash;
6363
@@ -76,7 +76,8 @@ IBigSegmentStore::GetMembershipResult RedisBigSegmentStore::GetMembership(
7676 return Membership::FromSegmentRefs (included, excluded);
7777}
7878
79- IBigSegmentStore::GetMetadataResult RedisBigSegmentStore::GetMetadata () const {
79+ IBigSegmentStore::GetMetadataResult RedisBigSegmentStore::GetMetadata ()
80+ const noexcept {
8081 sw::redis::OptionalString raw;
8182 try {
8283 raw = redis_->get (sync_time_key_);
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class IBigSegmentStore {
5454 * `std::nullopt`). Returns an error if the lookup itself failed.
5555 */
5656 [[nodiscard]] virtual GetMembershipResult GetMembership (
57- std::string const & context_hash) const = 0;
57+ std::string const & context_hash) const noexcept = 0;
5858
5959 /* *
6060 * @brief Returns store-level metadata used by the SDK to detect staleness.
@@ -63,7 +63,7 @@ class IBigSegmentStore {
6363 * `std::nullopt` if no metadata has ever been written (the store was
6464 * never populated), or an error if the lookup itself failed.
6565 */
66- [[nodiscard]] virtual GetMetadataResult GetMetadata () const = 0;
66+ [[nodiscard]] virtual GetMetadataResult GetMetadata () const noexcept = 0;
6767
6868 protected:
6969 IBigSegmentStore () = default ;
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ namespace {
2727// times GetMetadata was called and lets a test block until a target count.
2828class FakeBigSegmentStore : public integrations ::IBigSegmentStore {
2929 public:
30- GetMembershipResult GetMembership (std::string const &) const override {
30+ GetMembershipResult GetMembership (
31+ std::string const &) const noexcept override {
3132 std::unique_lock lock (mutex_);
3233 ++membership_calls_;
3334 cv_.notify_all ();
@@ -37,7 +38,7 @@ class FakeBigSegmentStore : public integrations::IBigSegmentStore {
3738 return membership_;
3839 }
3940
40- GetMetadataResult GetMetadata () const override {
41+ GetMetadataResult GetMetadata () const noexcept override {
4142 std::lock_guard lock (mutex_);
4243 ++metadata_calls_;
4344 cv_.notify_all ();
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ using namespace std::chrono_literals;
2323class StubStore final : public IBigSegmentStore {
2424 public:
2525 GetMembershipResult GetMembership (
26- std::string const & /* context_hash*/ ) const override {
26+ std::string const & /* context_hash*/ ) const noexcept override {
2727 return Membership::FromSegmentRefs ({}, {});
2828 }
29- GetMetadataResult GetMetadata () const override {
29+ GetMetadataResult GetMetadata () const noexcept override {
3030 return std::optional<StoreMetadata>{};
3131 }
3232};
You can’t perform that action at this time.
0 commit comments