From 987c5bd21e684eae88c0a593f3cda34337a47b62 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 23 Oct 2025 11:51:39 +0100 Subject: [PATCH] Reformat --- .../entry-processor/employee.h | 3 +- .../distributed-map/map-interceptor/main.cpp | 3 +- .../partitionaware/partitionAwarePutGet.cpp | 3 +- examples/distributed-map/query/employee.cpp | 3 +- examples/pipeline/PipeliningDemo.cpp | 3 +- examples/sql/sql_query_with_portable.cpp | 7 +- .../hazelcast/client/connection/ReadHandler.h | 3 +- .../include/hazelcast/client/entry_view.h | 3 +- .../hazelcast/client/exception/iexception.h | 3 +- .../hazelcast/client/hazelcast_client.h | 4 +- .../hazelcast/client/iexecutor_service.h | 6 +- hazelcast/include/hazelcast/client/ilist.h | 3 +- hazelcast/include/hazelcast/client/imap.h | 3 +- .../hazelcast/client/impl/BaseEventHandler.h | 6 +- .../hazelcast/client/impl/EntryEventHandler.h | 3 +- .../hazelcast/client/impl/ItemEventHandler.h | 4 +- .../client/internal/eviction/EvictableStore.h | 2 +- .../internal/eviction/EvictionListener.h | 7 +- .../eviction/EvictionPolicyEvaluator.h | 2 +- .../internal/eviction/EvictionStrategy.h | 2 +- .../DefaultEvictionPolicyEvaluator.h | 3 +- .../impl/strategy/AbstractEvictionStrategy.h | 2 +- .../internal/nearcache/NearCacheRecord.h | 3 +- .../nearcache/impl/DefaultNearCache.h | 3 +- .../EntryCountNearCacheMaxSizeChecker.h | 3 +- .../impl/record/AbstractNearCacheRecord.h | 3 +- .../impl/record/NearCacheObjectRecord.h | 3 +- .../impl/store/AbstractNearCacheRecordStore.h | 42 +- .../impl/store/HeapNearCacheRecordMap.h | 9 +- .../impl/store/NearCacheDataRecordStore.h | 3 +- .../impl/store/NearCacheObjectRecordStore.h | 3 +- .../client/internal/socket/BaseSocket.h | 90 +-- .../hazelcast/client/internal/version.h | 36 +- hazelcast/include/hazelcast/client/iqueue.h | 3 +- hazelcast/include/hazelcast/client/iset.h | 3 +- .../include/hazelcast/client/item_event.h | 3 +- hazelcast/include/hazelcast/client/itopic.h | 3 +- .../client/map/NearCachedClientMapProxy.h | 14 +- .../impl/nearcache/InvalidationAwareWrapper.h | 3 +- hazelcast/include/hazelcast/client/member.h | 4 +- .../include/hazelcast/client/multi_map.h | 3 +- .../include/hazelcast/client/pipelining.h | 3 +- .../include/hazelcast/client/pn_counter.h | 3 +- .../client/protocol/ClientExceptionFactory.h | 11 +- .../hazelcast/client/protocol/ClientMessage.h | 48 +- .../client/protocol/ClientMessageBuilder.h | 3 +- .../client/proxy/ReplicatedMapImpl.h | 43 +- .../hazelcast/client/proxy/RingbufferImpl.h | 3 +- .../hazelcast/client/query/predicates.h | 12 +- .../include/hazelcast/client/reliable_topic.h | 103 ++-- .../include/hazelcast/client/replicated_map.h | 9 +- .../include/hazelcast/client/ringbuffer.h | 3 +- .../client/serialization/generic_record.h | 3 +- .../serialization/generic_record_builder.h | 531 +++++++++--------- .../client/serialization/pimpl/data_input.h | 6 +- .../client/serialization/pimpl/data_output.h | 21 +- .../client/serialization/serialization.h | 44 +- .../hazelcast/client/spi/ClientContext.h | 2 +- .../spi/impl/listener/cluster_view_listener.h | 4 +- .../hazelcast/client/sql/impl/query_id.h | 2 +- .../client/sql/sql_column_metadata.h | 2 +- .../include/hazelcast/client/sql/sql_result.h | 88 +-- .../hazelcast/client/sql/sql_row_metadata.h | 2 +- .../hazelcast/client/sql/sql_service.h | 2 +- .../client/topic/impl/TopicEventHandlerImpl.h | 5 +- .../include/hazelcast/client/topic/message.h | 6 +- .../client/topic/reliable_listener.h | 2 +- .../hazelcast/client/transactional_list.h | 3 +- .../hazelcast/client/transactional_map.h | 3 +- .../client/transactional_multi_map.h | 3 +- .../hazelcast/client/transactional_queue.h | 3 +- .../hazelcast/client/transactional_set.h | 3 +- .../util/SampleableConcurrentHashMap.h | 3 +- hazelcast/include/hazelcast/util/Sync.h | 3 +- hazelcast/include/hazelcast/util/finally.h | 3 +- hazelcast/include/hazelcast/util/noop.h | 3 +- .../src/hazelcast/client/client_impl.cpp | 40 +- hazelcast/src/hazelcast/client/cluster.cpp | 24 +- hazelcast/src/hazelcast/client/compact.cpp | 228 ++++---- hazelcast/src/hazelcast/client/config.cpp | 51 +- hazelcast/src/hazelcast/client/discovery.cpp | 12 +- hazelcast/src/hazelcast/client/metrics.cpp | 6 +- hazelcast/src/hazelcast/client/near_cache.cpp | 12 +- hazelcast/src/hazelcast/client/network.cpp | 20 +- hazelcast/src/hazelcast/client/protocol.cpp | 80 ++- hazelcast/src/hazelcast/client/proxy.cpp | 89 ++- hazelcast/src/hazelcast/client/query.cpp | 9 +- .../src/hazelcast/client/serialization.cpp | 77 ++- hazelcast/src/hazelcast/client/spi.cpp | 92 +-- hazelcast/src/hazelcast/client/stats.cpp | 9 +- .../src/hazelcast/client/transactions.cpp | 30 +- hazelcast/src/hazelcast/cp/cp.cpp | 33 +- hazelcast/src/hazelcast/cp/cp_impl.cpp | 25 +- hazelcast/src/hazelcast/logger.cpp | 3 +- hazelcast/src/hazelcast/util/util.cpp | 15 +- hazelcast/test/src/ClientTest.cpp | 4 +- hazelcast/test/src/HazelcastTests1.cpp | 21 +- hazelcast/test/src/HazelcastTests2.cpp | 15 +- hazelcast/test/src/HazelcastTests3.cpp | 3 +- hazelcast/test/src/HazelcastTests5.cpp | 21 +- hazelcast/test/src/HazelcastTests7.cpp | 23 +- hazelcast/test/src/HazelcastTests8.cpp | 56 +- .../compact_read_write_integration_test.h | 3 +- .../compact/compact_schema_fetch_on_read.h | 3 +- .../serialization/sample_compact_type.h | 6 +- .../src/cpp-controller/RemoteController.cpp | 144 +++-- .../src/cpp-controller/RemoteController.h | 198 ++++--- .../cpp-controller/remote_controller_types.h | 24 +- hazelcast/test/src/executor/tasks/Tasks.h | 3 +- .../test/src/remote_controller_client.cpp | 4 +- .../test/src/serialization/Serializables.cpp | 6 +- hazelcast/test/src/sql_test.cpp | 491 ++++++++++++---- 112 files changed, 1964 insertions(+), 1216 deletions(-) diff --git a/examples/distributed-map/entry-processor/employee.h b/examples/distributed-map/entry-processor/employee.h index 32bebcccf6..9f25538fa8 100644 --- a/examples/distributed-map/entry-processor/employee.h +++ b/examples/distributed-map/entry-processor/employee.h @@ -60,7 +60,8 @@ struct hz_serializer static void write_data( const employee_raise_entry_processor& object, hazelcast::client::serialization::object_data_output& out) - {} + { + } employee_raise_entry_processor read_data( hazelcast::client::serialization::object_data_input& in) diff --git a/examples/distributed-map/map-interceptor/main.cpp b/examples/distributed-map/map-interceptor/main.cpp index be73b3e7b0..1a05355b29 100644 --- a/examples/distributed-map/map-interceptor/main.cpp +++ b/examples/distributed-map/map-interceptor/main.cpp @@ -32,7 +32,8 @@ struct hz_serializer : identified_data_serializer static void write_data( const MapInterceptor& object, hazelcast::client::serialization::object_data_output& out) - {} + { + } static MapInterceptor read_data( hazelcast::client::serialization::object_data_input& in) diff --git a/examples/distributed-map/partitionaware/partitionAwarePutGet.cpp b/examples/distributed-map/partitionaware/partitionAwarePutGet.cpp index 48cc647646..b13c449eec 100644 --- a/examples/distributed-map/partitionaware/partitionAwarePutGet.cpp +++ b/examples/distributed-map/partitionaware/partitionAwarePutGet.cpp @@ -21,7 +21,8 @@ struct PartitionAwareString { PartitionAwareString(const std::string& actual_key) : actual_key(actual_key) - {} + { + } const std::string* get_partition_key() const override { diff --git a/examples/distributed-map/query/employee.cpp b/examples/distributed-map/query/employee.cpp index 91bd86bd85..83a2fc4059 100644 --- a/examples/distributed-map/query/employee.cpp +++ b/examples/distributed-map/query/employee.cpp @@ -269,7 +269,8 @@ void hz_serializer::write_data( const examples::employee_entry_comparator& object, object_data_output& writer) -{} +{ +} examples::employee_entry_comparator hz_serializer::read_data( diff --git a/examples/pipeline/PipeliningDemo.cpp b/examples/pipeline/PipeliningDemo.cpp index dc91fa69db..177c0ac7c1 100644 --- a/examples/pipeline/PipeliningDemo.cpp +++ b/examples/pipeline/PipeliningDemo.cpp @@ -36,7 +36,8 @@ class PipeliningDemo : client_(hazelcast::new_client().get()) , map_(client_.get_map("map").get()) , gen_(rd_()) - {} + { + } void init() { diff --git a/examples/sql/sql_query_with_portable.cpp b/examples/sql/sql_query_with_portable.cpp index 544d80667e..cab5c9b326 100644 --- a/examples/sql/sql_query_with_portable.cpp +++ b/examples/sql/sql_query_with_portable.cpp @@ -104,8 +104,8 @@ main() )") .get(); - std::cout << "Mapping created. Affected row count:" << result->update_count() - << std::endl; + std::cout << "Mapping created. Affected row count:" + << result->update_count() << std::endl; // One can select all rows of the table with *. result = sql.execute("SELECT * FROM person_table").get(); @@ -114,7 +114,8 @@ main() // Fetch people older than 38 result = sql.execute("SELECT * FROM person_table WHERE age > ?", 38).get(); - std::cout << "Query(SELECT * FROM person_table WHERE age > 38) result:" << std::endl; + std::cout << "Query(SELECT * FROM person_table WHERE age > 38) result:" + << std::endl; print_result(*result); std::cout << "Finished" << std::endl; diff --git a/hazelcast/include/hazelcast/client/connection/ReadHandler.h b/hazelcast/include/hazelcast/client/connection/ReadHandler.h index 79ac6d9140..0321d65029 100644 --- a/hazelcast/include/hazelcast/client/connection/ReadHandler.h +++ b/hazelcast/include/hazelcast/client/connection/ReadHandler.h @@ -30,7 +30,8 @@ namespace hazelcast { namespace client { -namespace serialization {} +namespace serialization { +} namespace spi { class ClientContext; } diff --git a/hazelcast/include/hazelcast/client/entry_view.h b/hazelcast/include/hazelcast/client/entry_view.h index 8476648877..76a088c64e 100644 --- a/hazelcast/include/hazelcast/client/entry_view.h +++ b/hazelcast/include/hazelcast/client/entry_view.h @@ -52,7 +52,8 @@ class entry_view , last_stored_time(lastStoredTime) , last_update_time(lastUpdateTime) , version(version) - {} + { + } /** * key diff --git a/hazelcast/include/hazelcast/client/exception/iexception.h b/hazelcast/include/hazelcast/client/exception/iexception.h index 126b6363f3..7df3cbdcdf 100644 --- a/hazelcast/include/hazelcast/client/exception/iexception.h +++ b/hazelcast/include/hazelcast/client/exception/iexception.h @@ -104,7 +104,8 @@ class exception_builder public: explicit exception_builder(const std::string& source) : source_(source) - {} + { + } template exception_builder& operator<<(const T& message) diff --git a/hazelcast/include/hazelcast/client/hazelcast_client.h b/hazelcast/include/hazelcast/client/hazelcast_client.h index 91f2b9f24f..623f253d0e 100644 --- a/hazelcast/include/hazelcast/client/hazelcast_client.h +++ b/hazelcast/include/hazelcast/client/hazelcast_client.h @@ -71,8 +71,8 @@ namespace client { * Our C++ client is completely open source and the source code is freely * available at https://github.com/hazelcast/hazelcast-cpp-client . Please feel * free to contribute. You can join our community at - * https://hazelcastcommunity.slack.com/channels/cpp-client where you can find answers - * to your questions. + * https://hazelcastcommunity.slack.com/channels/cpp-client where you can find + * answers to your questions. */ class HAZELCAST_API hazelcast_client { diff --git a/hazelcast/include/hazelcast/client/iexecutor_service.h b/hazelcast/include/hazelcast/client/iexecutor_service.h index 10b4f33a88..a3b5155412 100644 --- a/hazelcast/include/hazelcast/client/iexecutor_service.h +++ b/hazelcast/include/hazelcast/client/iexecutor_service.h @@ -60,7 +60,8 @@ class HAZELCAST_API iexecutor_service : public proxy::ProxyImpl public: executor_promise(spi::ClientContext& context) : context_(context) - {} + { + } executor_promise( boost::future>& future, @@ -75,7 +76,8 @@ class HAZELCAST_API iexecutor_service : public proxy::ProxyImpl , member_uuid_(member) , context_(context) , invocation_(invocation) - {} + { + } bool cancel(bool may_interrupt_if_running) { diff --git a/hazelcast/include/hazelcast/client/ilist.h b/hazelcast/include/hazelcast/client/ilist.h index 30a8e86773..fc00d8bdc2 100644 --- a/hazelcast/include/hazelcast/client/ilist.h +++ b/hazelcast/include/hazelcast/client/ilist.h @@ -274,7 +274,8 @@ class ilist : public proxy::IListImpl private: ilist(const std::string& instance_name, spi::ClientContext* context) : proxy::IListImpl(instance_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/imap.h b/hazelcast/include/hazelcast/client/imap.h index 736c587dc2..c38c8bb614 100644 --- a/hazelcast/include/hazelcast/client/imap.h +++ b/hazelcast/include/hazelcast/client/imap.h @@ -68,7 +68,8 @@ class HAZELCAST_API imap : public proxy::IMapImpl imap(const std::string& instance_name, spi::ClientContext* context) : proxy::IMapImpl(instance_name, context) - {} + { + } /** * check if this map contains key. diff --git a/hazelcast/include/hazelcast/client/impl/BaseEventHandler.h b/hazelcast/include/hazelcast/client/impl/BaseEventHandler.h index 87755bfad3..8bc203709d 100644 --- a/hazelcast/include/hazelcast/client/impl/BaseEventHandler.h +++ b/hazelcast/include/hazelcast/client/impl/BaseEventHandler.h @@ -38,7 +38,7 @@ class HAZELCAST_API BaseEventHandler : public spi::EventHandler { public: - BaseEventHandler(logger &logger); + BaseEventHandler(logger& logger); ~BaseEventHandler() override; @@ -61,10 +61,10 @@ class HAZELCAST_API BaseEventHandler */ void on_listener_register() override {} - logger &get_logger() const; + logger& get_logger() const; protected: - logger &logger_; + logger& logger_; }; } // namespace impl } // namespace client diff --git a/hazelcast/include/hazelcast/client/impl/EntryEventHandler.h b/hazelcast/include/hazelcast/client/impl/EntryEventHandler.h index f2a90cfbf0..9298b106af 100644 --- a/hazelcast/include/hazelcast/client/impl/EntryEventHandler.h +++ b/hazelcast/include/hazelcast/client/impl/EntryEventHandler.h @@ -52,7 +52,8 @@ class EntryEventHandler : public BaseType , listener_(std::move(listener)) , include_value_(include_value) , logger_(lg) - {} + { + } void handle_entry( const boost::optional& key, diff --git a/hazelcast/include/hazelcast/client/impl/ItemEventHandler.h b/hazelcast/include/hazelcast/client/impl/ItemEventHandler.h index e804de5398..7fe93873dd 100644 --- a/hazelcast/include/hazelcast/client/impl/ItemEventHandler.h +++ b/hazelcast/include/hazelcast/client/impl/ItemEventHandler.h @@ -31,7 +31,7 @@ class item_event_handler : public BaseType public: item_event_handler( std::string instance_name, - logger &logger, + logger& logger, spi::impl::ClientClusterServiceImpl& cluster_service, serialization::pimpl::SerializationService& serialization_service, item_listener&& listener, @@ -41,7 +41,7 @@ class item_event_handler : public BaseType , cluster_service_(cluster_service) , serialization_service_(serialization_service) , listener_(std::move(listener)) - , include_value_(include_value){}; + , include_value_(include_value) {}; void handle_item(const boost::optional& item, boost::uuids::uuid uuid, diff --git a/hazelcast/include/hazelcast/client/internal/eviction/EvictableStore.h b/hazelcast/include/hazelcast/client/internal/eviction/EvictableStore.h index 299e0f0dc5..de9d14d3d1 100644 --- a/hazelcast/include/hazelcast/client/internal/eviction/EvictableStore.h +++ b/hazelcast/include/hazelcast/client/internal/eviction/EvictableStore.h @@ -64,7 +64,7 @@ class EvictableStore */ virtual int evict( std::vector>>* - /* eviction_candidates */, + /* eviction_candidates */, EvictionListener* /* eviction_listener */) { assert(0); diff --git a/hazelcast/include/hazelcast/client/internal/eviction/EvictionListener.h b/hazelcast/include/hazelcast/client/internal/eviction/EvictionListener.h index e7b760aa76..e367b5b876 100644 --- a/hazelcast/include/hazelcast/client/internal/eviction/EvictionListener.h +++ b/hazelcast/include/hazelcast/client/internal/eviction/EvictionListener.h @@ -54,9 +54,10 @@ class EvictionListener * @param wasExpired {@code true} if the entry was evicted due to * expiration, {@code false} otherwise */ - virtual void on_evict(const std::shared_ptr& /* evicted_entry_accessor */, - const std::shared_ptr& /* evicted_entry */, - bool /* was_expired */) + virtual void on_evict( + const std::shared_ptr& /* evicted_entry_accessor */, + const std::shared_ptr& /* evicted_entry */, + bool /* was_expired */) { assert(0); } diff --git a/hazelcast/include/hazelcast/client/internal/eviction/EvictionPolicyEvaluator.h b/hazelcast/include/hazelcast/client/internal/eviction/EvictionPolicyEvaluator.h index 7bf9cf6c03..3608a95b29 100644 --- a/hazelcast/include/hazelcast/client/internal/eviction/EvictionPolicyEvaluator.h +++ b/hazelcast/include/hazelcast/client/internal/eviction/EvictionPolicyEvaluator.h @@ -78,7 +78,7 @@ class EvictionPolicyEvaluator virtual std::unique_ptr>>> evaluate(util::Iterable>& - /* eviction_candidates */) const + /* eviction_candidates */) const { assert(0); return std::unique_ptr* - /* eviction_policy_evaluator*/, + /* eviction_policy_evaluator*/, EvictionChecker* /* eviction_checker*/, EvictionListener* /* eviction_listener */) { diff --git a/hazelcast/include/hazelcast/client/internal/eviction/impl/evaluator/DefaultEvictionPolicyEvaluator.h b/hazelcast/include/hazelcast/client/internal/eviction/impl/evaluator/DefaultEvictionPolicyEvaluator.h index 9c89aa3f52..f68641514a 100644 --- a/hazelcast/include/hazelcast/client/internal/eviction/impl/evaluator/DefaultEvictionPolicyEvaluator.h +++ b/hazelcast/include/hazelcast/client/internal/eviction/impl/evaluator/DefaultEvictionPolicyEvaluator.h @@ -53,7 +53,8 @@ class DefaultEvictionPolicyEvaluator const std::shared_ptr>& comparator) : eviction_policy_comparator_(comparator) - {} + { + } const std::shared_ptr> get_eviction_policy_comparator() const override diff --git a/hazelcast/include/hazelcast/client/internal/eviction/impl/strategy/AbstractEvictionStrategy.h b/hazelcast/include/hazelcast/client/internal/eviction/impl/strategy/AbstractEvictionStrategy.h index 43f0d6fe46..d79586677a 100644 --- a/hazelcast/include/hazelcast/client/internal/eviction/impl/strategy/AbstractEvictionStrategy.h +++ b/hazelcast/include/hazelcast/client/internal/eviction/impl/strategy/AbstractEvictionStrategy.h @@ -99,7 +99,7 @@ class AbstractEvictionStrategy protected: virtual int evict_internal(S* /* evictable_store */, EvictionPolicyEvaluator* - /* eviction_policy_evaluator */, + /* eviction_policy_evaluator */, EvictionListener* /* eviction_listener */) { assert(0); diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/NearCacheRecord.h b/hazelcast/include/hazelcast/client/internal/nearcache/NearCacheRecord.h index 4d9bc25592..a717268f8a 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/NearCacheRecord.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/NearCacheRecord.h @@ -102,7 +102,8 @@ class NearCacheRecord * @param now current time in milliseconds * @return {@code true} if exceeds max idle seconds, otherwise {@code false} */ - virtual bool is_idle_at(int64_t /* max_idle_milli_seconds */, int64_t /* now */) = 0; + virtual bool is_idle_at(int64_t /* max_idle_milli_seconds */, + int64_t /* now */) = 0; /** * @return last known invalidation sequence at time of this records' diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/DefaultNearCache.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/DefaultNearCache.h index bfdfac2a8e..322234e19d 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/DefaultNearCache.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/DefaultNearCache.h @@ -56,7 +56,8 @@ class DefaultNearCache : public NearCache , execution_service_(es) , serialization_service_(ss) , logger_(lg) - {} + { + } ~DefaultNearCache() override = default; diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/maxsize/EntryCountNearCacheMaxSizeChecker.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/maxsize/EntryCountNearCacheMaxSizeChecker.h index ab978acbc1..8ac8dee88c 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/maxsize/EntryCountNearCacheMaxSizeChecker.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/maxsize/EntryCountNearCacheMaxSizeChecker.h @@ -47,7 +47,8 @@ class EntryCountNearCacheMaxSizeChecker : public eviction::MaxSizeChecker const store::HeapNearCacheRecordMap& record_map) : near_cache_record_map_(record_map) , max_size_(size) - {} + { + } bool is_reached_to_max_size() const override { diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/AbstractNearCacheRecord.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/AbstractNearCacheRecord.h index 7ad0180834..b8bb4269ab 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/AbstractNearCacheRecord.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/AbstractNearCacheRecord.h @@ -56,7 +56,8 @@ class AbstractNearCacheRecord : public NearCacheRecord , expiration_time_(expiry_time) , access_time_(NearCacheRecord::TIME_NOT_SET) , access_hit_(0) - {} + { + } std::shared_ptr get_value() const override { return value_; } diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/NearCacheObjectRecord.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/NearCacheObjectRecord.h index a1d1b35689..3eae280e0b 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/NearCacheObjectRecord.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/record/NearCacheObjectRecord.h @@ -45,7 +45,8 @@ class NearCacheObjectRecord : public AbstractNearCacheRecord int64_t creation_time, int64_t expiry_time) : AbstractNearCacheRecord(value, creation_time, expiry_time) - {} + { + } }; } // namespace record } // namespace impl diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/AbstractNearCacheRecordStore.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/AbstractNearCacheRecordStore.h index 2c207d2dd5..49e3ec0b61 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/AbstractNearCacheRecordStore.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/AbstractNearCacheRecordStore.h @@ -93,7 +93,8 @@ class AbstractNearCacheRecordStore */ // public for tests. - virtual const std::shared_ptr get_record(const std::shared_ptr& /* key */) + virtual const std::shared_ptr get_record( + const std::shared_ptr& /* key */) { assert(0); return std::shared_ptr(); @@ -234,9 +235,8 @@ class AbstractNearCacheRecordStore protected: virtual std::unique_ptr - create_near_cache_max_size_checker( - const client::config::eviction_config&, - const client::config::near_cache_config&) + create_near_cache_max_size_checker(const client::config::eviction_config&, + const client::config::near_cache_config&) { assert(0); return std::unique_ptr(); @@ -259,7 +259,8 @@ class AbstractNearCacheRecordStore get_record_storage_memory_cost(record); } - virtual std::unique_ptr value_to_record(const std::shared_ptr& /* value */) + virtual std::unique_ptr value_to_record( + const std::shared_ptr& /* value */) { assert(0); return std::unique_ptr(); @@ -279,8 +280,9 @@ class AbstractNearCacheRecordStore return std::shared_ptr(); } - virtual std::shared_ptr put_record(const std::shared_ptr& /* key */, - const std::shared_ptr& /* record */) + virtual std::shared_ptr put_record( + const std::shared_ptr& /* key */, + const std::shared_ptr& /* record */) { assert(0); return std::shared_ptr(); @@ -292,7 +294,8 @@ class AbstractNearCacheRecordStore assert(0); } - virtual std::shared_ptr remove_record(const std::shared_ptr& /* key */) + virtual std::shared_ptr remove_record( + const std::shared_ptr& /* key */) { assert(0); return std::shared_ptr(); @@ -425,7 +428,7 @@ class AbstractNearCacheRecordStore } } - void on_record_create(const std::shared_ptr&/* key */, + void on_record_create(const std::shared_ptr& /* key */, const std::shared_ptr& record) { record->set_creation_time(util::current_time_millis()); @@ -440,19 +443,22 @@ class AbstractNearCacheRecordStore void on_get(const std::shared_ptr& /* key */, const std::shared_ptr& /* value */, const std::shared_ptr& /* record */) - {} + { + } void on_get_error(const std::shared_ptr& /* key */, const std::shared_ptr& /* value */, const std::shared_ptr& /* record */, const exception::iexception& /* error */) - {} + { + } void on_put(const std::shared_ptr& /* key */, const std::shared_ptr& /* value */, const std::shared_ptr& /* record */, const std::shared_ptr& /* old_record */) - {} + { + } /* void onPut(const std::shared_ptr &key, @@ -467,7 +473,8 @@ class AbstractNearCacheRecordStore const std::shared_ptr& /* record */, const std::shared_ptr& /* old_record */, const exception::iexception& /* error */) - {} + { + } /* void onPutError(const std::shared_ptr &key, @@ -481,13 +488,15 @@ class AbstractNearCacheRecordStore void on_remove(const std::shared_ptr& /* key */, const std::shared_ptr& /* record */, bool /* removed */) - {} + { + } void on_remove_error(const std::shared_ptr& /* key */, const std::shared_ptr& /* record */, bool /* removed */, const exception::iexception& /* error */) - {} + { + } void on_expire(const std::shared_ptr& /* key */, const std::shared_ptr& /* record */) @@ -536,7 +545,8 @@ MEM.arrayIndexScale(Object[].class) : (Integer.SIZE / Byte.SIZE); public: MaxSizeEvictionChecker(const eviction::MaxSizeChecker* max_size_checker) : max_size_checker_(max_size_checker) - {} + { + } bool is_eviction_required() const override { diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/HeapNearCacheRecordMap.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/HeapNearCacheRecordMap.h index 99f8817122..2afc61e791 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/HeapNearCacheRecordMap.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/HeapNearCacheRecordMap.h @@ -50,7 +50,8 @@ class HeapNearCacheRecordMap int32_t initial_capacity) : util::SampleableConcurrentHashMap(initial_capacity) , serialization_service_(ss) - {} + { + } ~HeapNearCacheRecordMap() override = default; @@ -66,7 +67,8 @@ class HeapNearCacheRecordMap : util::SampleableConcurrentHashMap::SamplingEntry(key, value) , serialization_service_(ss) - {} + { + } ~NearCacheEvictableSamplingEntry() override = default; @@ -187,7 +189,8 @@ class HeapNearCacheRecordMap typename util::SampleableConcurrentHashMap::E>& adapted_iterator) : it_(adapted_iterator) - {} + { + } bool has_next() override { return it_.has_next(); } diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheDataRecordStore.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheDataRecordStore.h index 6d74f1384f..22efe5f3b3 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheDataRecordStore.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheDataRecordStore.h @@ -58,7 +58,8 @@ class NearCacheDataRecordStore record::NearCacheDataRecord>(name, config, ss) - {} + { + } protected: int64_t get_key_storage_memory_cost(KS* key) const override diff --git a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheObjectRecordStore.h b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheObjectRecordStore.h index db105c841a..28d65973b8 100644 --- a/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheObjectRecordStore.h +++ b/hazelcast/include/hazelcast/client/internal/nearcache/impl/store/NearCacheObjectRecordStore.h @@ -55,7 +55,8 @@ class NearCacheObjectRecordStore record::NearCacheObjectRecord>(name, config, ss) - {} + { + } protected: int64_t get_key_storage_memory_cost(KS* /* key */) const override diff --git a/hazelcast/include/hazelcast/client/internal/socket/BaseSocket.h b/hazelcast/include/hazelcast/client/internal/socket/BaseSocket.h index 9fdd51d5ce..d83d79c41f 100644 --- a/hazelcast/include/hazelcast/client/internal/socket/BaseSocket.h +++ b/hazelcast/include/hazelcast/client/internal/socket/BaseSocket.h @@ -48,7 +48,8 @@ class BaseSocket : public hazelcast::client::socket , connect_timeout_(connect_timeout_in_millis) , resolver_(io_resolver) , socket_(io) - {} + { + } #ifdef HZ_BUILD_WITH_SSL @@ -69,7 +70,8 @@ class BaseSocket : public hazelcast::client::socket , connect_timeout_(connect_timeout_in_millis) , resolver_(io_resolver) , socket_(io, context) - {} + { + } #endif // HZ_BUILD_WITH_SSL void connect( @@ -117,31 +119,32 @@ class BaseSocket : public hazelcast::client::socket { check_connection(connection, invocation); auto message = invocation->get_client_message(); - boost::asio::post(socket_strand_, [connection, invocation, message, this]() mutable { - if (!check_connection(connection, invocation)) { - return; - } + boost::asio::post( + socket_strand_, [connection, invocation, message, this]() mutable { + if (!check_connection(connection, invocation)) { + return; + } - add_invocation_to_map(connection, invocation, message); + add_invocation_to_map(connection, invocation, message); - auto& datas = message->get_buffer(); + auto& datas = message->get_buffer(); - entry outbox_entry; - outbox_entry.buffers.reserve(datas.size()); - for (const auto& data : datas) { - outbox_entry.buffers.emplace_back(boost::asio::buffer(data)); - } - outbox_entry.message = std::move(message); - outbox_entry.invocation = std::move(invocation); - this->outbox_.push_back(std::move(outbox_entry)); + entry outbox_entry; + outbox_entry.buffers.reserve(datas.size()); + for (const auto& data : datas) { + outbox_entry.buffers.emplace_back(boost::asio::buffer(data)); + } + outbox_entry.message = std::move(message); + outbox_entry.invocation = std::move(invocation); + this->outbox_.push_back(std::move(outbox_entry)); - if (this->outbox_.size() > 1) { - // async write is in progress - return; - } + if (this->outbox_.size() > 1) { + // async write is in progress + return; + } - do_write(connection); - }); + do_write(connection); + }); } // always called from within the socket_strand_ @@ -248,28 +251,27 @@ class BaseSocket : public hazelcast::client::socket void do_write(const std::shared_ptr connection) { - auto handler = - [connection, this](const boost::system::error_code& ec, - std::size_t /* bytes_written */) { - auto invocation = std::move(outbox_[0].invocation); - this->outbox_.pop_front(); - - if (ec) { - auto message = - (boost::format{ "Error %1% during invocation write for %2% " - "on connection %3%" } % - ec % *invocation % *connection) - .str(); - connection->close(message); - } else { - // update the connection write time - connection->last_write_time(std::chrono::steady_clock::now()); - - if (!this->outbox_.empty()) { - do_write(connection); - } - } - }; + auto handler = [connection, this](const boost::system::error_code& ec, + std::size_t /* bytes_written */) { + auto invocation = std::move(outbox_[0].invocation); + this->outbox_.pop_front(); + + if (ec) { + auto message = + (boost::format{ "Error %1% during invocation write for %2% " + "on connection %3%" } % + ec % *invocation % *connection) + .str(); + connection->close(message); + } else { + // update the connection write time + connection->last_write_time(std::chrono::steady_clock::now()); + + if (!this->outbox_.empty()) { + do_write(connection); + } + } + }; const auto& message = outbox_[0].buffers; boost::asio::async_write( diff --git a/hazelcast/include/hazelcast/client/internal/version.h b/hazelcast/include/hazelcast/client/internal/version.h index 656656b1f6..69fa62a329 100644 --- a/hazelcast/include/hazelcast/client/internal/version.h +++ b/hazelcast/include/hazelcast/client/internal/version.h @@ -1,18 +1,18 @@ /* -* Copyright (c) 2008-2025, Hazelcast, Inc. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2008-2025, Hazelcast, Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #pragma once @@ -22,8 +22,10 @@ namespace hazelcast { namespace client { namespace internal { /** - * A generic version to be used with version aware classes. The version is composed of two bytes, denoting - * {@code MAJOR.MINOR} version. It is used to represent the Hazelcast cluster version. + * A generic version to be used with version aware classes. The version is + * composed of two bytes, denoting + * {@code MAJOR.MINOR} version. It is used to represent the Hazelcast cluster + * version. * * @since 5.5 */ @@ -32,6 +34,6 @@ struct version byte major; byte minor; }; -} // namespace impl +} // namespace internal } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/iqueue.h b/hazelcast/include/hazelcast/client/iqueue.h index c10754181e..e5ba05f564 100644 --- a/hazelcast/include/hazelcast/client/iqueue.h +++ b/hazelcast/include/hazelcast/client/iqueue.h @@ -262,7 +262,8 @@ class iqueue : public proxy::IQueueImpl private: iqueue(const std::string& instance_name, spi::ClientContext* context) : proxy::IQueueImpl(instance_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/iset.h b/hazelcast/include/hazelcast/client/iset.h index 14f45f16b7..1ad929a030 100644 --- a/hazelcast/include/hazelcast/client/iset.h +++ b/hazelcast/include/hazelcast/client/iset.h @@ -157,7 +157,8 @@ class HAZELCAST_API iset : public proxy::ISetImpl private: iset(const std::string& instance_name, spi::ClientContext* context) : proxy::ISetImpl(instance_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/item_event.h b/hazelcast/include/hazelcast/client/item_event.h index 5d2f334a1c..8b2f90137d 100644 --- a/hazelcast/include/hazelcast/client/item_event.h +++ b/hazelcast/include/hazelcast/client/item_event.h @@ -84,7 +84,8 @@ class HAZELCAST_API item_event : public item_event_base const member& member) : item_event_base(name, member, event_type) , item_(item) - {} + { + } /** * @returns the item. diff --git a/hazelcast/include/hazelcast/client/itopic.h b/hazelcast/include/hazelcast/client/itopic.h index 2c2610a726..ffde4807de 100644 --- a/hazelcast/include/hazelcast/client/itopic.h +++ b/hazelcast/include/hazelcast/client/itopic.h @@ -88,7 +88,8 @@ class itopic : public proxy::ITopicImpl private: itopic(const std::string& instance_name, spi::ClientContext* context) : proxy::ITopicImpl(instance_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/map/NearCachedClientMapProxy.h b/hazelcast/include/hazelcast/client/map/NearCachedClientMapProxy.h index ec4c1d9e2b..5044993089 100644 --- a/hazelcast/include/hazelcast/client/map/NearCachedClientMapProxy.h +++ b/hazelcast/include/hazelcast/client/map/NearCachedClientMapProxy.h @@ -64,7 +64,8 @@ class NearCachedClientMapProxy , near_cache_config_( *context->get_client_config().get_near_cache_config(instance_name)) , logger_(context->get_logger()) - {} + { + } protected: typedef std::unordered_map, @@ -506,13 +507,15 @@ class NearCachedClientMapProxy public: // TODO: implement RepairingTask as in Java client ClientMapAddNearCacheEventHandler( - logger &logger, + logger& logger, const std::shared_ptr< internal::nearcache::NearCache>& cache) - : protocol::codec::map_addnearcacheinvalidationlistener_handler(logger) + : protocol::codec::map_addnearcacheinvalidationlistener_handler( + logger) , near_cache_(cache) - {} + { + } void before_listener_register() override { near_cache_->clear(); } @@ -574,7 +577,8 @@ class NearCachedClientMapProxy entry_event::type listener_flags) : name_(name) , listener_flags_(listener_flags) - {} + { + } private: const std::string& name_; diff --git a/hazelcast/include/hazelcast/client/map/impl/nearcache/InvalidationAwareWrapper.h b/hazelcast/include/hazelcast/client/map/impl/nearcache/InvalidationAwareWrapper.h index 79e538cda1..55cfca4779 100644 --- a/hazelcast/include/hazelcast/client/map/impl/nearcache/InvalidationAwareWrapper.h +++ b/hazelcast/include/hazelcast/client/map/impl/nearcache/InvalidationAwareWrapper.h @@ -55,7 +55,8 @@ class InvalidationAwareWrapper : public internal::nearcache::NearCache : near_cache_(cache) , key_state_marker_( new internal::nearcache::impl::KeyStateMarkerImpl(partition_count)) - {} + { + } ~InvalidationAwareWrapper() override = default; diff --git a/hazelcast/include/hazelcast/client/member.h b/hazelcast/include/hazelcast/client/member.h index d0ad44ecf2..2e3be02683 100644 --- a/hazelcast/include/hazelcast/client/member.h +++ b/hazelcast/include/hazelcast/client/member.h @@ -89,8 +89,8 @@ class HAZELCAST_API member bool operator>=(const version& rhs) const; - friend std::ostream HAZELCAST_API & - operator<<(std::ostream& os, const version& version); + friend std::ostream HAZELCAST_API& operator<<(std::ostream& os, + const version& version); }; member(); diff --git a/hazelcast/include/hazelcast/client/multi_map.h b/hazelcast/include/hazelcast/client/multi_map.h index 465bf82559..dd472db21d 100644 --- a/hazelcast/include/hazelcast/client/multi_map.h +++ b/hazelcast/include/hazelcast/client/multi_map.h @@ -396,7 +396,8 @@ class HAZELCAST_API multi_map : public proxy::MultiMapImpl private: multi_map(const std::string& instance_name, spi::ClientContext* context) : proxy::MultiMapImpl(instance_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/pipelining.h b/hazelcast/include/hazelcast/client/pipelining.h index 947703db1a..a1dc6fe5cd 100644 --- a/hazelcast/include/hazelcast/client/pipelining.h +++ b/hazelcast/include/hazelcast/client/pipelining.h @@ -144,7 +144,8 @@ class pipelining : public std::enable_shared_from_this> pipelining(int depth) : permits_( util::Preconditions::check_positive(depth, "depth must be positive")) - {} + { + } void down() { diff --git a/hazelcast/include/hazelcast/client/pn_counter.h b/hazelcast/include/hazelcast/client/pn_counter.h index 77d50db29b..9412902913 100644 --- a/hazelcast/include/hazelcast/client/pn_counter.h +++ b/hazelcast/include/hazelcast/client/pn_counter.h @@ -82,7 +82,8 @@ class HAZELCAST_API pn_counter : public proxy::PNCounterImpl private: pn_counter(const std::string& object_name, spi::ClientContext* context) : PNCounterImpl(SERVICE_NAME, object_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/protocol/ClientExceptionFactory.h b/hazelcast/include/hazelcast/client/protocol/ClientExceptionFactory.h index 56eb46472d..e7c018d2bd 100644 --- a/hazelcast/include/hazelcast/client/protocol/ClientExceptionFactory.h +++ b/hazelcast/include/hazelcast/client/protocol/ClientExceptionFactory.h @@ -76,11 +76,12 @@ template class ExceptionFactoryImpl : public ExceptionFactory { public: - std::exception_ptr create_exception(const ClientExceptionFactory& /* factory */, - const std::string& source, - const std::string& message, - const std::string& details, - std::exception_ptr cause) const override + std::exception_ptr create_exception( + const ClientExceptionFactory& /* factory */, + const std::string& source, + const std::string& message, + const std::string& details, + std::exception_ptr cause) const override { try { BOOST_THROW_EXCEPTION(EXCEPTION(source, message, details, cause)); diff --git a/hazelcast/include/hazelcast/client/protocol/ClientMessage.h b/hazelcast/include/hazelcast/client/protocol/ClientMessage.h index cfc3f0e72a..349ca6561a 100644 --- a/hazelcast/include/hazelcast/client/protocol/ClientMessage.h +++ b/hazelcast/include/hazelcast/client/protocol/ClientMessage.h @@ -100,10 +100,12 @@ struct HAZELCAST_API paging_predicate_holder } // namespace codec template -struct is_trivial_or_uuid : std::is_trivial {}; +struct is_trivial_or_uuid : std::is_trivial +{}; template<> -struct is_trivial_or_uuid : std::true_type {}; +struct is_trivial_or_uuid : std::true_type +{}; template struct HAZELCAST_API is_trivial_entry_vector : std::false_type @@ -995,9 +997,7 @@ class HAZELCAST_API ClientMessage /** * skips the header bytes of the frame */ - void skip_frame_header_bytes() { - rd_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS); - } + void skip_frame_header_bytes() { rd_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS); } template typename std::enable_if::value, @@ -1178,8 +1178,8 @@ class HAZELCAST_API ClientMessage { bool isNull = (nullptr == value); if (isNull) { - auto* h = - reinterpret_cast(wr_ptr(sizeof(frame_header_type))); + auto* h = reinterpret_cast( + wr_ptr(sizeof(frame_header_type))); *h = null_frame(); if (is_final) { h->flags |= IS_FINAL_FLAG; @@ -1195,8 +1195,8 @@ class HAZELCAST_API ClientMessage inline void set(const std::string& value, bool is_final = false) { - auto h = - reinterpret_cast(wr_ptr(sizeof(frame_header_type))); + auto h = reinterpret_cast( + wr_ptr(sizeof(frame_header_type))); auto len = value.length(); h->frame_len = sizeof(frame_header_type) + len; if (is_final) { @@ -1271,7 +1271,8 @@ class HAZELCAST_API ClientMessage boost::endian::endian_reverse_inplace( *reinterpret_cast(&uuid.data[0])); boost::endian::endian_reverse_inplace( - *reinterpret_cast(&uuid.data[util::Bits::LONG_SIZE_IN_BYTES])); + *reinterpret_cast( + &uuid.data[util::Bits::LONG_SIZE_IN_BYTES])); std::memcpy(wr_ptr(util::Bits::UUID_SIZE_IN_BYTES), &uuid.data[0], util::Bits::UUID_SIZE_IN_BYTES); @@ -1284,8 +1285,8 @@ class HAZELCAST_API ClientMessage bool is_final = false) { if (value.data_size() == 0) { - auto* h = - reinterpret_cast(wr_ptr(sizeof(frame_header_type))); + auto* h = reinterpret_cast( + wr_ptr(sizeof(frame_header_type))); *h = null_frame(); if (is_final) { h->flags |= IS_FINAL_FLAG; @@ -1343,15 +1344,16 @@ class HAZELCAST_API ClientMessage template void set(const std::vector& values, bool is_final = false) { - auto* h = - reinterpret_cast(wr_ptr(sizeof(frame_header_type))); + auto* h = reinterpret_cast( + wr_ptr(sizeof(frame_header_type))); *h = begin_frame(); for (auto& item : values) { set(item); } - h = reinterpret_cast(wr_ptr(sizeof(frame_header_type))); + h = reinterpret_cast( + wr_ptr(sizeof(frame_header_type))); *h = end_frame(); if (is_final) { h->flags |= IS_FINAL_FLAG; @@ -1359,12 +1361,12 @@ class HAZELCAST_API ClientMessage } template - void set_contains_nullable(const std::vector& values, bool is_final = false) + void set_contains_nullable(const std::vector& values, + bool is_final = false) { set(values, is_final); } - void set(const frame_header_type& header) { auto pos = wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS); @@ -1378,8 +1380,8 @@ class HAZELCAST_API ClientMessage add_begin_frame(); set(frame_header_type{ SIZE_OF_FRAME_LENGTH_AND_FLAGS + - 2 * util::Bits::UUID_SIZE_IN_BYTES, - DEFAULT_FLAGS }); + 2 * util::Bits::UUID_SIZE_IN_BYTES, + DEFAULT_FLAGS }); std::memcpy(wr_ptr(util::Bits::UUID_SIZE_IN_BYTES), query_id.member_id.data, @@ -1566,15 +1568,15 @@ class HAZELCAST_API ClientMessage void add_begin_frame() { - auto* f = - reinterpret_cast(wr_ptr(sizeof(frame_header_type))); + auto* f = reinterpret_cast( + wr_ptr(sizeof(frame_header_type))); *f = begin_frame(); } void add_end_frame(bool is_final) { - auto ef = - reinterpret_cast(wr_ptr(sizeof(frame_header_type))); + auto ef = reinterpret_cast( + wr_ptr(sizeof(frame_header_type))); *ef = end_frame(); if (is_final) { ef->flags |= IS_FINAL_FLAG; diff --git a/hazelcast/include/hazelcast/client/protocol/ClientMessageBuilder.h b/hazelcast/include/hazelcast/client/protocol/ClientMessageBuilder.h index 0cde2ea0d6..92cf0d1753 100644 --- a/hazelcast/include/hazelcast/client/protocol/ClientMessageBuilder.h +++ b/hazelcast/include/hazelcast/client/protocol/ClientMessageBuilder.h @@ -31,7 +31,8 @@ class ClientMessageBuilder public: ClientMessageBuilder(MessageHandler& handler) : message_handler_(handler) - {} + { + } virtual ~ClientMessageBuilder() = default; diff --git a/hazelcast/include/hazelcast/client/proxy/ReplicatedMapImpl.h b/hazelcast/include/hazelcast/client/proxy/ReplicatedMapImpl.h index fd29b0c356..2b5e042748 100644 --- a/hazelcast/include/hazelcast/client/proxy/ReplicatedMapImpl.h +++ b/hazelcast/include/hazelcast/client/proxy/ReplicatedMapImpl.h @@ -320,7 +320,8 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl public: NearCacheInvalidationListenerMessageCodec(const std::string& name) : name_(name) - {} + { + } protocol::ClientMessage encode_add_request( bool local_only) const override @@ -352,7 +353,8 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl : name_(name) , key_data_(key_data) , predicate_data_(predicate_data) - {} + { + } protocol::ClientMessage encode_add_request( bool local_only) const override @@ -384,7 +386,8 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl serialization::pimpl::data&& key_data) : name_(name) , predicate_data_(key_data) - {} + { + } protocol::ClientMessage encode_add_request( bool local_only) const override @@ -415,7 +418,8 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl serialization::pimpl::data&& key_data) : name_(name) , key_data_(key_data) - {} + { + } protocol::ClientMessage encode_add_request( bool local_only) const override @@ -442,7 +446,8 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl public: ReplicatedMapListenerMessageCodec(const std::string& name) : name_(name) - {} + { + } protocol::ClientMessage encode_add_request( bool local_only) const override @@ -467,13 +472,15 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl { public: ReplicatedMapAddNearCacheEventHandler( - const std::shared_ptr< - internal::nearcache::NearCache>& - near_cache, logger &logger) - : protocol::codec::replicatedmap_addnearcacheentrylistener_handler(logger), - near_cache_(near_cache) - {} + const std::shared_ptr>& near_cache, + logger& logger) + : protocol::codec::replicatedmap_addnearcacheentrylistener_handler( + logger) + , near_cache_(near_cache) + { + } void before_listener_register() override { near_cache_->clear(); } @@ -483,7 +490,8 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl const boost::optional& key, const boost::optional& /* value */, const boost::optional& /* old_value */, - const boost::optional& /* merging_value */, + const boost::optional< + serialization::pimpl::data>& /* merging_value */, int32_t event_type, boost::uuids::uuid /* uuid */, int32_t /* number_of_affected_entries */) override @@ -563,11 +571,10 @@ class HAZELCAST_API ReplicatedMapImpl : public ProxyImpl { try { invalidation_listener_id_ = - register_listener( - create_near_cache_invalidation_listener_codec(), - std::shared_ptr( - new ReplicatedMapAddNearCacheEventHandler(near_cache_, - get_context().get_logger()))) + register_listener(create_near_cache_invalidation_listener_codec(), + std::shared_ptr( + new ReplicatedMapAddNearCacheEventHandler( + near_cache_, get_context().get_logger()))) .get(); } catch (exception::iexception& e) { HZ_LOG(get_context().get_logger(), diff --git a/hazelcast/include/hazelcast/client/proxy/RingbufferImpl.h b/hazelcast/include/hazelcast/client/proxy/RingbufferImpl.h index dca4596838..43666533de 100644 --- a/hazelcast/include/hazelcast/client/proxy/RingbufferImpl.h +++ b/hazelcast/include/hazelcast/client/proxy/RingbufferImpl.h @@ -166,7 +166,8 @@ class HAZELCAST_API RingbufferImpl : public PartitionSpecificClientProxy protected: RingbufferImpl(const std::string& object_name, spi::ClientContext* context) : PartitionSpecificClientProxy(SERVICE_NAME, object_name, context) - {} + { + } boost::future add_data(serialization::pimpl::data&& item_data) { diff --git a/hazelcast/include/hazelcast/client/query/predicates.h b/hazelcast/include/hazelcast/client/query/predicates.h index d10b1b3151..0195ca4514 100644 --- a/hazelcast/include/hazelcast/client/query/predicates.h +++ b/hazelcast/include/hazelcast/client/query/predicates.h @@ -292,7 +292,8 @@ class in_predicate : public multi_predicate const std::string& attribute_name, const Args&... values) : multi_predicate(attribute_name, client, values...) - {} + { + } /** * The type of Args should be able to be serialized. @@ -304,7 +305,8 @@ class in_predicate : public multi_predicate const std::string& attribute_name, const std::vector& values) : multi_predicate(attribute_name, client, values) - {} + { + } }; class and_predicate : public multi_predicate @@ -313,7 +315,8 @@ class and_predicate : public multi_predicate template and_predicate(hazelcast_client& client, const Args&... values) : multi_predicate(client, values...) - {} + { + } }; class or_predicate : public multi_predicate @@ -322,7 +325,8 @@ class or_predicate : public multi_predicate template or_predicate(hazelcast_client& client, const PredicateTypes&... values) : multi_predicate(client, values...) - {} + { + } }; class not_predicate : public base_predicate diff --git a/hazelcast/include/hazelcast/client/reliable_topic.h b/hazelcast/include/hazelcast/client/reliable_topic.h index 478f7ac633..20d7b163c3 100644 --- a/hazelcast/include/hazelcast/client/reliable_topic.h +++ b/hazelcast/include/hazelcast/client/reliable_topic.h @@ -184,56 +184,59 @@ class HAZELCAST_API reliable_topic } auto runner = this->shared_from_this(); - auto execution_service = this->execution_service_; + auto execution_service = this->execution_service_; ringbuffer_->read_many(sequence_, 1, batch_size_) - .then(executor_, [runner,execution_service](boost::future f) { - if (runner->cancelled_) { - return; - } - - try { - auto result = f.get(); - - // we process all messages in batch. So we don't release - // the thread and reschedule ourselves; but we'll process - // whatever was received in 1 go. - auto lost_count = - result.get_next_sequence_to_read_from() - - result.read_count() - runner->sequence_; - if (lost_count != 0 && - !runner->listener_.loss_tolerant_) { - runner->cancel(); - return; - } - - auto const& items = result.get_items(); - for (size_t i = 0; i < items.size(); i++) { - auto const& message = items[i]; - try { - runner->listener_.store_sequence_id_( - result.get_sequence(static_cast(i))); - auto rel_msg = message.get< - topic::impl::reliable::ReliableTopicMessage>(); - runner->process(*rel_msg); - } catch (exception::iexception& e) { - if (runner->terminate(e)) { - runner->cancel(); - return; - } - } - } - - runner->sequence_ = - result.get_next_sequence_to_read_from(); - runner->next(); - } catch (exception::iexception& ie) { - if (runner->handle_internal_exception(ie)) { - runner->next(); - } else { - runner->cancel(); - } - } - }); + .then(executor_, + [runner, + execution_service](boost::future f) { + if (runner->cancelled_) { + return; + } + + try { + auto result = f.get(); + + // we process all messages in batch. So we don't + // release the thread and reschedule ourselves; but + // we'll process whatever was received in 1 go. + auto lost_count = + result.get_next_sequence_to_read_from() - + result.read_count() - runner->sequence_; + if (lost_count != 0 && + !runner->listener_.loss_tolerant_) { + runner->cancel(); + return; + } + + auto const& items = result.get_items(); + for (size_t i = 0; i < items.size(); i++) { + auto const& message = items[i]; + try { + runner->listener_.store_sequence_id_( + result.get_sequence(static_cast(i))); + auto rel_msg = + message.get(); + runner->process(*rel_msg); + } catch (exception::iexception& e) { + if (runner->terminate(e)) { + runner->cancel(); + return; + } + } + } + + runner->sequence_ = + result.get_next_sequence_to_read_from(); + runner->next(); + } catch (exception::iexception& ie) { + if (runner->handle_internal_exception(ie)) { + runner->next(); + } else { + runner->cancel(); + } + } + }); } bool handle_operation_timeout_exception() @@ -417,7 +420,7 @@ class HAZELCAST_API reliable_topic logger& logger_; const std::string& name_; std::shared_ptr - execution_service_; + execution_service_; util::hz_thread_pool& executor_; serialization::pimpl::SerializationService& serialization_service_; int batch_size_; diff --git a/hazelcast/include/hazelcast/client/replicated_map.h b/hazelcast/include/hazelcast/client/replicated_map.h index 13d217b39f..c41d129d08 100644 --- a/hazelcast/include/hazelcast/client/replicated_map.h +++ b/hazelcast/include/hazelcast/client/replicated_map.h @@ -307,7 +307,8 @@ class HAZELCAST_API replicated_map : public proxy::ReplicatedMapImpl private: replicated_map(const std::string& object_name, spi::ClientContext* context) : proxy::ReplicatedMapImpl(SERVICE_NAME, object_name, context) - {} + { + } template class EntryEventHandler : public HANDLER @@ -325,7 +326,8 @@ class HAZELCAST_API replicated_map : public proxy::ReplicatedMapImpl , serialization_service_(serialization_service) , listener_(std::move(listener)) , logger_(lg) - {} + { + } void handle_entry( const boost::optional& key, @@ -362,7 +364,8 @@ class HAZELCAST_API replicated_map : public proxy::ReplicatedMapImpl const boost::optional& /* key */, const boost::optional& /* value */, const boost::optional& /* old_value */, - const boost::optional& /* merging_value */, + const boost::optional< + serialization::pimpl::data>& /* merging_value */, int32_t event_type, boost::uuids::uuid uuid, int32_t number_of_affected_entries) diff --git a/hazelcast/include/hazelcast/client/ringbuffer.h b/hazelcast/include/hazelcast/client/ringbuffer.h index fbe9ecf6aa..8b17070497 100644 --- a/hazelcast/include/hazelcast/client/ringbuffer.h +++ b/hazelcast/include/hazelcast/client/ringbuffer.h @@ -293,7 +293,8 @@ class HAZELCAST_API ringbuffer : public proxy::RingbufferImpl private: ringbuffer(const std::string& object_name, spi::ClientContext* context) : RingbufferImpl(object_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/serialization/generic_record.h b/hazelcast/include/hazelcast/client/serialization/generic_record.h index 4fc073b8a9..197e50af81 100644 --- a/hazelcast/include/hazelcast/client/serialization/generic_record.h +++ b/hazelcast/include/hazelcast/client/serialization/generic_record.h @@ -1041,7 +1041,8 @@ class HAZELCAST_API generic_record friend bool HAZELCAST_API operator!=(const generic_record&, const generic_record&); - generic_record(std::shared_ptr, std::unordered_map); + generic_record(std::shared_ptr, + std::unordered_map); const pimpl::schema& get_schema() const; friend boost::property_tree::ptree write_generic_record( diff --git a/hazelcast/include/hazelcast/client/serialization/generic_record_builder.h b/hazelcast/include/hazelcast/client/serialization/generic_record_builder.h index 1833cf8278..cdd65b978d 100644 --- a/hazelcast/include/hazelcast/client/serialization/generic_record_builder.h +++ b/hazelcast/include/hazelcast/client/serialization/generic_record_builder.h @@ -527,24 +527,25 @@ class HAZELCAST_API generic_record_builder generic_record_builder& set_array_of_boolean(std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice. - * - * @param field_name name of the field as it is defined in its schema - * definition. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema definition or the type of the field does not match - * the one in the schema definition or the same field is trying to be set - * without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_boolean(std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice. + * + * @param field_name name of the field as it is defined in its schema + * definition. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema definition or the type of the field does not match + * the one in the schema definition or the same field is trying to be set + * without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_boolean( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -585,24 +586,25 @@ class HAZELCAST_API generic_record_builder generic_record_builder& set_array_of_int8(std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice. - * - * @param field_name name of the field as it is defined in its schema - * definition. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema definition or the type of the field does not match - * the one in the schema definition or the same field is trying to be set - * without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_int8(std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice. + * + * @param field_name name of the field as it is defined in its schema + * definition. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema definition or the type of the field does not match + * the one in the schema definition or the same field is trying to be set + * without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_int8( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -643,24 +645,25 @@ class HAZELCAST_API generic_record_builder generic_record_builder& set_array_of_int16(std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice. - * - * @param field_name name of the field as it is defined in its schema - * definition. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema definition or the type of the field does not match - * the one in the schema definition or the same field is trying to be set - * without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_int16(std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice. + * + * @param field_name name of the field as it is defined in its schema + * definition. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema definition or the type of the field does not match + * the one in the schema definition or the same field is trying to be set + * without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_int16( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -701,24 +704,25 @@ class HAZELCAST_API generic_record_builder generic_record_builder& set_array_of_int32(std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice. - * - * @param field_name name of the field as it is defined in its schema - * definition. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema definition or the type of the field does not match - * the one in the schema definition or the same field is trying to be set - * without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_int32(std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice. + * + * @param field_name name of the field as it is defined in its schema + * definition. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema definition or the type of the field does not match + * the one in the schema definition or the same field is trying to be set + * without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_int32( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -759,24 +763,25 @@ class HAZELCAST_API generic_record_builder generic_record_builder& set_array_of_int64(std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice. - * - * @param field_name name of the field as it is defined in its schema - * definition. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema definition or the type of the field does not match - * the one in the schema definition or the same field is trying to be set - * without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_int64(std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice. + * + * @param field_name name of the field as it is defined in its schema + * definition. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema definition or the type of the field does not match + * the one in the schema definition or the same field is trying to be set + * without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_int64( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -817,24 +822,25 @@ class HAZELCAST_API generic_record_builder generic_record_builder& set_array_of_float32(std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice. - * - * @param field_name name of the field as it is defined in its schema - * definition. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema definition or the type of the field does not match - * the one in the schema definition or the same field is trying to be set - * without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_float32(std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice. + * + * @param field_name name of the field as it is defined in its schema + * definition. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema definition or the type of the field does not match + * the one in the schema definition or the same field is trying to be set + * without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_float32( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -875,24 +881,25 @@ class HAZELCAST_API generic_record_builder generic_record_builder& set_array_of_float64(std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice. - * - * @param field_name name of the field as it is defined in its schema - * definition. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema definition or the type of the field does not match - * the one in the schema definition or the same field is trying to be set - * without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_float64(std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice. + * + * @param field_name name of the field as it is defined in its schema + * definition. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema definition or the type of the field does not match + * the one in the schema definition or the same field is trying to be set + * without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_float64( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -933,25 +940,25 @@ class HAZELCAST_API generic_record_builder std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice.

Supported only for Compact. - * Note that, array will be copied to transform values. - * - * @param field_name name of the field as it is defined in its schema. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema or the type of the field does not match the one in - * the schema or the same field - * is trying to be set without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_nullable_boolean( - std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice.

Supported only for Compact. + * Note that, array will be copied to transform values. + * + * @param field_name name of the field as it is defined in its schema. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema or the type of the field does not match the one in + * the schema or the same field + * is trying to be set without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_nullable_boolean( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -992,25 +999,25 @@ class HAZELCAST_API generic_record_builder std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice.

Supported only for Compact - * Note that, array will be copied to transform values. - * - * @param field_name name of the field as it is defined in its schema. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema or the type of the field does not match the one in - * the schema or the same field - * is trying to be set without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_nullable_int8( - std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice.

Supported only for Compact + * Note that, array will be copied to transform values. + * + * @param field_name name of the field as it is defined in its schema. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema or the type of the field does not match the one in + * the schema or the same field + * is trying to be set without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_nullable_int8( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -1051,25 +1058,25 @@ class HAZELCAST_API generic_record_builder std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice.

Supported only for Compact - * Note that, array will be copied to transform values. - * - * @param field_name name of the field as it is defined in its schema. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema or the type of the field does not match the one in - * the schema or the same field - * is trying to be set without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_nullable_int16( - std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice.

Supported only for Compact + * Note that, array will be copied to transform values. + * + * @param field_name name of the field as it is defined in its schema. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema or the type of the field does not match the one in + * the schema or the same field + * is trying to be set without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_nullable_int16( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -1110,25 +1117,25 @@ class HAZELCAST_API generic_record_builder std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice.

Supported only for Compact - * Note that, array will be copied to transform values. - * - * @param field_name name of the field as it is defined in its schema. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema or the type of the field does not match the one in - * the schema or the same field - * is trying to be set without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_nullable_int32( - std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice.

Supported only for Compact + * Note that, array will be copied to transform values. + * + * @param field_name name of the field as it is defined in its schema. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema or the type of the field does not match the one in + * the schema or the same field + * is trying to be set without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_nullable_int32( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -1169,25 +1176,25 @@ class HAZELCAST_API generic_record_builder std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice.

Supported only for Compact - * Note that, array will be copied to transform values. - * - * @param field_name name of the field as it is defined in its schema. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema or the type of the field does not match the one in - * the schema or the same field - * is trying to be set without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_nullable_int64( - std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice.

Supported only for Compact + * Note that, array will be copied to transform values. + * + * @param field_name name of the field as it is defined in its schema. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema or the type of the field does not match the one in + * the schema or the same field + * is trying to be set without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_nullable_int64( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -1228,25 +1235,25 @@ class HAZELCAST_API generic_record_builder std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice.

Supported only for Compact - * Note that, array will be copied to transform values. - * - * @param field_name name of the field as it is defined in its schema. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema or the type of the field does not match the one in - * the schema or the same field - * is trying to be set without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_nullable_float32( - std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice.

Supported only for Compact + * Note that, array will be copied to transform values. + * + * @param field_name name of the field as it is defined in its schema. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema or the type of the field does not match the one in + * the schema or the same field + * is trying to be set without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_nullable_float32( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -1287,25 +1294,25 @@ class HAZELCAST_API generic_record_builder std::string field_name, std::vector value); - /** - * It is legal to set the field again only when Builder is created with - * {@link generic_record::new_builder_with_clone()}. Otherwise, it is - * illegal to set to the same field twice.

Supported only for Compact - * Note that, array will be copied to transform values. - * - * @param field_name name of the field as it is defined in its schema. - * @param value to set to generic_record - * @return itself for chaining - * @throws exception::hazelcast_serialization if the field name does not - * exist in the schema or the type of the field does not match the one in - * the schema or the same field - * is trying to be set without using - * {@link - * generic_record::new_builder_with_clone()}. - */ - generic_record_builder& set_array_of_nullable_float64( - std::string field_name, - std::initializer_list value); + /** + * It is legal to set the field again only when Builder is created with + * {@link generic_record::new_builder_with_clone()}. Otherwise, it is + * illegal to set to the same field twice.

Supported only for Compact + * Note that, array will be copied to transform values. + * + * @param field_name name of the field as it is defined in its schema. + * @param value to set to generic_record + * @return itself for chaining + * @throws exception::hazelcast_serialization if the field name does not + * exist in the schema or the type of the field does not match the one in + * the schema or the same field + * is trying to be set without using + * {@link + * generic_record::new_builder_with_clone()}. + */ + generic_record_builder& set_array_of_nullable_float64( + std::string field_name, + std::initializer_list value); /** * It is legal to set the field again only when Builder is created with @@ -1469,7 +1476,8 @@ class HAZELCAST_API generic_record_builder friend class generic_record; friend class pimpl::compact_stream_serializer; generic_record_builder( - std::shared_ptr); // DeserializedSchemaBoundGenericRecordBuilder + std::shared_ptr< + pimpl::schema>); // DeserializedSchemaBoundGenericRecordBuilder generic_record_builder( std::shared_ptr, std::unordered_map overwritten_fields_; std::unordered_map objects_; - boost::variant> writer_or_schema_; + boost::variant> + writer_or_schema_; }; } // namespace generic_record diff --git a/hazelcast/include/hazelcast/client/serialization/pimpl/data_input.h b/hazelcast/include/hazelcast/client/serialization/pimpl/data_input.h index afe9d73eab..b420f6d615 100644 --- a/hazelcast/include/hazelcast/client/serialization/pimpl/data_input.h +++ b/hazelcast/include/hazelcast/client/serialization/pimpl/data_input.h @@ -49,7 +49,8 @@ class data_input : byte_order_(byte_order) , buffer_(buf) , pos_(0) - {} + { + } data_input(boost::endian::order byte_order, const Container& buf, @@ -57,7 +58,8 @@ class data_input : byte_order_(byte_order) , buffer_(buf) , pos_(offset) - {} + { + } inline void read_fully(std::vector& bytes) { diff --git a/hazelcast/include/hazelcast/client/serialization/pimpl/data_output.h b/hazelcast/include/hazelcast/client/serialization/pimpl/data_output.h index 528fec3707..fc43919458 100644 --- a/hazelcast/include/hazelcast/client/serialization/pimpl/data_output.h +++ b/hazelcast/include/hazelcast/client/serialization/pimpl/data_output.h @@ -60,19 +60,19 @@ class HAZELCAST_API data_output /** * * @param number_of_bytes The zeros to be appended to the current buffer - */ + */ inline void write_zero_bytes(size_t number_of_bytes); /** * * @return Returns the current position - */ + */ inline size_t position() const; /** * * @param new_pos Sets the new position as specified - */ + */ inline void position(size_t new_pos); /** @@ -209,27 +209,32 @@ class HAZELCAST_API data_output } }; -const std::vector& data_output::to_byte_array() const +const std::vector& +data_output::to_byte_array() const { return output_stream_; } -void data_output::append_bytes(const std::vector& bytes) +void +data_output::append_bytes(const std::vector& bytes) { output_stream_.insert(output_stream_.end(), bytes.begin(), bytes.end()); } -void data_output::write_zero_bytes(size_t number_of_bytes) +void +data_output::write_zero_bytes(size_t number_of_bytes) { output_stream_.insert(output_stream_.end(), number_of_bytes, 0); } -size_t data_output::position() const +size_t +data_output::position() const { return output_stream_.size(); } -void data_output::position(size_t new_pos) +void +data_output::position(size_t new_pos) { if (is_no_write_) { return; diff --git a/hazelcast/include/hazelcast/client/serialization/serialization.h b/hazelcast/include/hazelcast/client/serialization/serialization.h index bd79429a78..ce29da47be 100644 --- a/hazelcast/include/hazelcast/client/serialization/serialization.h +++ b/hazelcast/include/hazelcast/client/serialization/serialization.h @@ -347,8 +347,8 @@ struct HAZELCAST_API hz_serializer : public builtin_serializer }; template<> -struct HAZELCAST_API hz_serializer - : public builtin_serializer +struct HAZELCAST_API + hz_serializer : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -359,8 +359,8 @@ struct HAZELCAST_API hz_serializer }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -370,8 +370,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -381,8 +381,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -392,8 +392,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -403,8 +403,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -414,8 +414,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -425,8 +425,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -436,8 +436,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -447,8 +447,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer> - : public builtin_serializer +struct HAZELCAST_API + hz_serializer> : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() @@ -458,8 +458,8 @@ struct HAZELCAST_API hz_serializer> }; template<> -struct HAZELCAST_API hz_serializer - : public builtin_serializer +struct HAZELCAST_API + hz_serializer : public builtin_serializer { public: static inline pimpl::serialization_constants get_type_id() diff --git a/hazelcast/include/hazelcast/client/spi/ClientContext.h b/hazelcast/include/hazelcast/client/spi/ClientContext.h index 956804ed0e..d50c06fe80 100644 --- a/hazelcast/include/hazelcast/client/spi/ClientContext.h +++ b/hazelcast/include/hazelcast/client/spi/ClientContext.h @@ -46,7 +46,7 @@ namespace serialization { namespace pimpl { class SerializationService; class default_schema_service; -} +} // namespace pimpl } // namespace serialization namespace impl { diff --git a/hazelcast/include/hazelcast/client/spi/impl/listener/cluster_view_listener.h b/hazelcast/include/hazelcast/client/spi/impl/listener/cluster_view_listener.h index 2f32413c16..9c4afded6b 100644 --- a/hazelcast/include/hazelcast/client/spi/impl/listener/cluster_view_listener.h +++ b/hazelcast/include/hazelcast/client/spi/impl/listener/cluster_view_listener.h @@ -48,7 +48,9 @@ class cluster_view_listener int connection_id; cluster_view_listener& view_listener; - event_handler(int connectionId, cluster_view_listener& viewListener, logger &logger); + event_handler(int connectionId, + cluster_view_listener& viewListener, + logger& logger); virtual void before_listener_register() override; diff --git a/hazelcast/include/hazelcast/client/sql/impl/query_id.h b/hazelcast/include/hazelcast/client/sql/impl/query_id.h index 68ff99fd00..f68b376b00 100644 --- a/hazelcast/include/hazelcast/client/sql/impl/query_id.h +++ b/hazelcast/include/hazelcast/client/sql/impl/query_id.h @@ -32,7 +32,7 @@ struct HAZELCAST_API query_id boost::uuids::uuid local_id; }; -std::ostream HAZELCAST_API & +std::ostream HAZELCAST_API& operator<<(std::ostream& os, const query_id& id); } // namespace impl diff --git a/hazelcast/include/hazelcast/client/sql/sql_column_metadata.h b/hazelcast/include/hazelcast/client/sql/sql_column_metadata.h index 64d5a2a214..9a0e051dfb 100644 --- a/hazelcast/include/hazelcast/client/sql/sql_column_metadata.h +++ b/hazelcast/include/hazelcast/client/sql/sql_column_metadata.h @@ -31,7 +31,7 @@ struct HAZELCAST_API sql_column_metadata bool nullable; friend bool HAZELCAST_API operator==(const sql_column_metadata& lhs, - const sql_column_metadata& rhs); + const sql_column_metadata& rhs); }; } // namespace sql diff --git a/hazelcast/include/hazelcast/client/sql/sql_result.h b/hazelcast/include/hazelcast/client/sql/sql_result.h index 44ded2b49a..31e8ecf473 100644 --- a/hazelcast/include/hazelcast/client/sql/sql_result.h +++ b/hazelcast/include/hazelcast/client/sql/sql_result.h @@ -67,10 +67,10 @@ class sql_service; class HAZELCAST_API sql_result : public std::enable_shared_from_this { public: - /** - * Copy is allowed for convenience but it does shallow copy so it should be avoided. - */ + * Copy is allowed for convenience but it does shallow copy so it should be + * avoided. + */ class HAZELCAST_API page_iterator { public: @@ -98,7 +98,6 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this bool has_next() const; private: - std::shared_ptr> in_progress_; std::shared_ptr> last_; std::shared_ptr row_metadata_; @@ -108,8 +107,9 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this }; /** - * Copy is allowed for convenience but it does shallow copy so it should be avoided. - */ + * Copy is allowed for convenience but it does shallow copy so it should be + * avoided. + */ class HAZELCAST_API page_iterator_sync { public: @@ -121,12 +121,12 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this /** * Sets timeout for page fetch operation. - */ + */ void set_timeout(std::chrono::milliseconds); /** * Retrieves the timeout - */ + */ std::chrono::milliseconds timeout() const; friend HAZELCAST_API bool operator==(const page_iterator_sync&, @@ -134,35 +134,35 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this friend HAZELCAST_API bool operator!=(const page_iterator_sync&, const page_iterator_sync&); - /** * Dereferences current page. It doesn't block. * - * @throws exception::no_such_element if the iterator points to the past-end - */ + * @throws exception::no_such_element if the iterator points to the + * past-end + */ std::shared_ptr operator*() const; /** * Dereferences current page. * * @throws no_such_element if the iterator points to the past-end - */ + */ std::shared_ptr operator->() const; /** * Post increment operator is deleted. - */ + */ page_iterator_sync operator++(int) = delete; /** * Fetches next page with blocking manner. - * - * @throws exception::no_such_element if the iterator points to the past-end or operation is timedout. - */ + * + * @throws exception::no_such_element if the iterator points to the + * past-end or operation is timedout. + */ page_iterator_sync& operator++(); private: - friend class sql_result; page_iterator_sync(page_iterator&&, std::chrono::milliseconds timeout); page_iterator_sync() = default; @@ -181,8 +181,9 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this }; /** - * Copy is allowed for convenience but it does shallow copy so it should be avoided. - */ + * Copy is allowed for convenience but it does shallow copy so it should be + * avoided. + */ class HAZELCAST_API row_iterator_sync { public: @@ -194,12 +195,12 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this /** * Sets timeout for page fetch operation. - */ + */ void set_timeout(std::chrono::milliseconds); /** * Retrieves the timeout - */ + */ std::chrono::milliseconds timeout() const; friend HAZELCAST_API bool operator==(const row_iterator_sync&, @@ -208,34 +209,38 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this const row_iterator_sync&); /** - * Returns current row. It might block in case of the current page is empty. + * Returns current row. It might block in case of the current page is + * empty. * - * @throws exception::no_such_element if the iterator points to the past-end - */ + * @throws exception::no_such_element if the iterator points to the + * past-end + */ const sql_page::sql_row& operator*() const; - /** - * Returns current row. It might block in case of the current page is empty. + * Returns current row. It might block in case of the current page is + * empty. * - * @throws exception::no_such_element if the iterator points to the past-end - */ + * @throws exception::no_such_element if the iterator points to the + * past-end + */ const sql_page::sql_row* operator->() const; /** * Post increment operator is deleted because copy is discouraged. - */ + */ row_iterator_sync operator++(int) = delete; /** - * Fetches next row in blocking manner. If page is already fetched, it doesn't block, otherwise it blocks. + * Fetches next row in blocking manner. If page is already fetched, it + * doesn't block, otherwise it blocks. * - * @throws exception::no_such_element if the iterator points to the past-end or operation is timedout. - */ + * @throws exception::no_such_element if the iterator points to the + * past-end or operation is timedout. + */ row_iterator_sync& operator++(); private: - friend class sql_result; row_iterator_sync(page_iterator_sync&&); row_iterator_sync() = default; @@ -336,15 +341,14 @@ class HAZELCAST_API sql_result : public std::enable_shared_from_this * @param first_page The first page of the sql result * @param cursor_buffer_size The cursor buffer size of the sql result */ - sql_result( - spi::ClientContext* client_context, - sql_service* service, - std::shared_ptr connection, - impl::query_id id, - int64_t update_count, - std::shared_ptr row_metadata, - std::shared_ptr first_page, - int32_t cursor_buffer_size); + sql_result(spi::ClientContext* client_context, + sql_service* service, + std::shared_ptr connection, + impl::query_id id, + int64_t update_count, + std::shared_ptr row_metadata, + std::shared_ptr first_page, + int32_t cursor_buffer_size); private: boost::future> fetch_page(); diff --git a/hazelcast/include/hazelcast/client/sql/sql_row_metadata.h b/hazelcast/include/hazelcast/client/sql/sql_row_metadata.h index 546d57ac8a..0bd9169fb9 100644 --- a/hazelcast/include/hazelcast/client/sql/sql_row_metadata.h +++ b/hazelcast/include/hazelcast/client/sql/sql_row_metadata.h @@ -79,7 +79,7 @@ class HAZELCAST_API sql_row_metadata const_iterator end() const; friend bool HAZELCAST_API operator==(const sql_row_metadata& lhs, - const sql_row_metadata& rhs); + const sql_row_metadata& rhs); private: std::vector columns_; diff --git a/hazelcast/include/hazelcast/client/sql/sql_service.h b/hazelcast/include/hazelcast/client/sql/sql_service.h index 3930a73ffe..cac1c1ef79 100644 --- a/hazelcast/include/hazelcast/client/sql/sql_service.h +++ b/hazelcast/include/hazelcast/client/sql/sql_service.h @@ -109,7 +109,7 @@ class HAZELCAST_API sql_service */ template boost::future> execute(const std::string& query, - const Params&... params) + const Params&... params) { sql_statement s{ client_context_, query }; int _[] = { 0, (s.add_parameter(params), 0)... }; diff --git a/hazelcast/include/hazelcast/client/topic/impl/TopicEventHandlerImpl.h b/hazelcast/include/hazelcast/client/topic/impl/TopicEventHandlerImpl.h index bbb4c99038..664dc340c1 100644 --- a/hazelcast/include/hazelcast/client/topic/impl/TopicEventHandlerImpl.h +++ b/hazelcast/include/hazelcast/client/topic/impl/TopicEventHandlerImpl.h @@ -35,7 +35,7 @@ class TopicEventHandlerImpl public: TopicEventHandlerImpl( const std::string& instance_name, - logger &logger, + logger& logger, spi::impl::ClientClusterServiceImpl& cluster_service, serialization::pimpl::SerializationService& serialization_service, listener&& message_listener) @@ -44,7 +44,8 @@ class TopicEventHandlerImpl , cluster_service_(cluster_service) , serialization_service_(serialization_service) , listener_(std::move(message_listener)) - {} + { + } void handle_topic(serialization::pimpl::data const& item, int64_t publish_time, diff --git a/hazelcast/include/hazelcast/client/topic/message.h b/hazelcast/include/hazelcast/client/topic/message.h index 050ec52a1a..107d597fd1 100644 --- a/hazelcast/include/hazelcast/client/topic/message.h +++ b/hazelcast/include/hazelcast/client/topic/message.h @@ -43,7 +43,8 @@ class HAZELCAST_API message std::chrono::milliseconds(publish_time)) .count()), std::move(member)) - {} + { + } message(std::string topic_name, typed_data&& msg, @@ -53,7 +54,8 @@ class HAZELCAST_API message , publish_time_(publish_time) , publishing_member_(member) , name_(std::move(topic_name)) - {} + { + } const typed_data& get_message_object() const { return message_object_; } diff --git a/hazelcast/include/hazelcast/client/topic/reliable_listener.h b/hazelcast/include/hazelcast/client/topic/reliable_listener.h index 9fdb4e9473..04f3fa1791 100644 --- a/hazelcast/include/hazelcast/client/topic/reliable_listener.h +++ b/hazelcast/include/hazelcast/client/topic/reliable_listener.h @@ -206,7 +206,7 @@ class HAZELCAST_API reliable_listener final exception_handler_t terminal_{ [](const exception::iexception&) { return false; } }; - on_cancel_handler_t on_cancel_{util::noop<>}; + on_cancel_handler_t on_cancel_{ util::noop<> }; }; } // namespace topic diff --git a/hazelcast/include/hazelcast/client/transactional_list.h b/hazelcast/include/hazelcast/client/transactional_list.h index b7fe8dea76..c12d0341d2 100644 --- a/hazelcast/include/hazelcast/client/transactional_list.h +++ b/hazelcast/include/hazelcast/client/transactional_list.h @@ -53,7 +53,8 @@ class transactional_list : public proxy::TransactionalListImpl transactional_list(const std::string& instance_name, txn::TransactionProxy& context) : proxy::TransactionalListImpl(instance_name, context) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/transactional_map.h b/hazelcast/include/hazelcast/client/transactional_map.h index b97ea8ff11..1dab72d0eb 100644 --- a/hazelcast/include/hazelcast/client/transactional_map.h +++ b/hazelcast/include/hazelcast/client/transactional_map.h @@ -218,7 +218,8 @@ class HAZELCAST_API transactional_map : public proxy::TransactionalMapImpl transactional_map(const std::string& name, txn::TransactionProxy& transaction_proxy) : proxy::TransactionalMapImpl(name, transaction_proxy) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/transactional_multi_map.h b/hazelcast/include/hazelcast/client/transactional_multi_map.h index c9920fe002..7d10d9ebc7 100644 --- a/hazelcast/include/hazelcast/client/transactional_multi_map.h +++ b/hazelcast/include/hazelcast/client/transactional_multi_map.h @@ -94,7 +94,8 @@ class HAZELCAST_API transactional_multi_map transactional_multi_map(const std::string& name, txn::TransactionProxy& transaction_proxy) : proxy::TransactionalMultiMapImpl(name, transaction_proxy) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/transactional_queue.h b/hazelcast/include/hazelcast/client/transactional_queue.h index 9220a9460d..fb05745d3c 100644 --- a/hazelcast/include/hazelcast/client/transactional_queue.h +++ b/hazelcast/include/hazelcast/client/transactional_queue.h @@ -79,7 +79,8 @@ class HAZELCAST_API transactional_queue : public proxy::TransactionalQueueImpl transactional_queue(const std::string& name, txn::TransactionProxy& transaction_proxy) : proxy::TransactionalQueueImpl(name, transaction_proxy) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/client/transactional_set.h b/hazelcast/include/hazelcast/client/transactional_set.h index 428045c53c..0bd475cfee 100644 --- a/hazelcast/include/hazelcast/client/transactional_set.h +++ b/hazelcast/include/hazelcast/client/transactional_set.h @@ -53,7 +53,8 @@ class transactional_set : public proxy::TransactionalSetImpl transactional_set(const std::string& name, txn::TransactionProxy& transaction_proxy) : TransactionalSetImpl(name, transaction_proxy) - {} + { + } }; } // namespace client } // namespace hazelcast diff --git a/hazelcast/include/hazelcast/util/SampleableConcurrentHashMap.h b/hazelcast/include/hazelcast/util/SampleableConcurrentHashMap.h index 2fdf5b9c6c..1895175759 100644 --- a/hazelcast/include/hazelcast/util/SampleableConcurrentHashMap.h +++ b/hazelcast/include/hazelcast/util/SampleableConcurrentHashMap.h @@ -51,7 +51,8 @@ class SampleableConcurrentHashMap const std::shared_ptr entry_value) : key_(entry_key) , value_(entry_value) - {} + { + } const std::shared_ptr& get_entry_key() const { return key_; } diff --git a/hazelcast/include/hazelcast/util/Sync.h b/hazelcast/include/hazelcast/util/Sync.h index 91f94ba55b..397ea472c3 100644 --- a/hazelcast/include/hazelcast/util/Sync.h +++ b/hazelcast/include/hazelcast/util/Sync.h @@ -33,7 +33,8 @@ class Sync Sync(const T& v) : v_(v) - {} + { + } virtual ~Sync() = default; diff --git a/hazelcast/include/hazelcast/util/finally.h b/hazelcast/include/hazelcast/util/finally.h index 4abd9fbb2a..44c871594f 100644 --- a/hazelcast/include/hazelcast/util/finally.h +++ b/hazelcast/include/hazelcast/util/finally.h @@ -30,7 +30,8 @@ class HAZELCAST_API finally public: finally(const std::function& functor) : functor(functor) - {} + { + } ~finally() { functor(); } }; } // namespace util diff --git a/hazelcast/include/hazelcast/util/noop.h b/hazelcast/include/hazelcast/util/noop.h index c8fbf37af3..cd5b8addf7 100644 --- a/hazelcast/include/hazelcast/util/noop.h +++ b/hazelcast/include/hazelcast/util/noop.h @@ -27,6 +27,7 @@ namespace util { template inline void noop(Args...) -{} +{ +} } // namespace util } // namespace hazelcast diff --git a/hazelcast/src/hazelcast/client/client_impl.cpp b/hazelcast/src/hazelcast/client/client_impl.cpp index ab34ed4a4a..ce1ac07654 100644 --- a/hazelcast/src/hazelcast/client/client_impl.cpp +++ b/hazelcast/src/hazelcast/client/client_impl.cpp @@ -520,11 +520,12 @@ hazelcast_client_instance_impl::check_discovery_configuration_consistency( BaseEventHandler::~BaseEventHandler() = default; -BaseEventHandler::BaseEventHandler(logger &logger) +BaseEventHandler::BaseEventHandler(logger& logger) : logger_(logger) -{} +{ +} -logger & +logger& BaseEventHandler::get_logger() const { return logger_; @@ -537,21 +538,24 @@ address::address() : host_("localhost") , type_(IPV4) , scope_id_(0) -{} +{ +} address::address(std::string url, int port) : host_(std::move(url)) , port_(port) , type_(IPV4) , scope_id_(0) -{} +{ +} address::address(std::string hostname, int port, unsigned long scope_id) : host_(std::move(hostname)) , port_(port) , type_(IPV6) , scope_id_(scope_id) -{} +{ +} bool address::operator==(const address& rhs) const @@ -837,7 +841,8 @@ iexecutor_service::iexecutor_service(const std::string& name, : ProxyImpl(SERVICE_NAME, name, context) , consecutive_submits_(0) , last_submit_time_(0) -{} +{ +} std::vector iexecutor_service::select_members(const member_selector& member_selector) @@ -1010,7 +1015,8 @@ client_property::client_property(const std::string& name, const std::string& default_value) : name_(name) , default_value_(default_value) -{} +{ +} const std::string& client_property::get_name() const @@ -1071,7 +1077,8 @@ client_properties::client_properties( , partition_arg_cache_size_(PARTITION_ARGUMENT_CACHE_SIZE, PARTITION_ARGUMENT_CACHE_SIZE_DEFAULT) , properties_map_(properties) -{} +{ +} const client_property& client_properties::get_heartbeat_timeout() const @@ -1223,7 +1230,8 @@ iexception::iexception(std::string exception_name, , report_((boost::format("%1% {%2%. Error code:%3%, Details:%4%.} at %5%.") % exception_name % msg_ % error_code_ % details_ % src_) .str()) -{} +{ +} iexception::~iexception() noexcept = default; @@ -1290,7 +1298,8 @@ retryable_hazelcast::retryable_hazelcast(std::string source, std::move(cause), true, true) -{} +{ +} retryable_hazelcast::retryable_hazelcast(std::string error_name, int32_t error_code, @@ -1308,7 +1317,8 @@ retryable_hazelcast::retryable_hazelcast(std::string error_name, std::move(cause), runtime, retryable) -{} +{ +} member_left::member_left(std::string source, std::string message, @@ -1322,7 +1332,8 @@ member_left::member_left(std::string source, std::move(cause), false, true) -{} +{ +} consistency_lost::consistency_lost(std::string source, std::string message, @@ -1336,7 +1347,8 @@ consistency_lost::consistency_lost(std::string source, std::move(cause), true, false) -{} +{ +} query::query(std::string source, std::string message, diff --git a/hazelcast/src/hazelcast/client/cluster.cpp b/hazelcast/src/hazelcast/client/cluster.cpp index b6e9ee8ac3..6bfda61750 100644 --- a/hazelcast/src/hazelcast/client/cluster.cpp +++ b/hazelcast/src/hazelcast/client/cluster.cpp @@ -33,7 +33,8 @@ namespace hazelcast { namespace client { cluster::cluster(spi::impl::ClientClusterServiceImpl& cluster_service) : cluster_service_(cluster_service) -{} +{ +} std::vector cluster::get_members() @@ -56,7 +57,8 @@ cluster::remove_membership_listener(boost::uuids::uuid registration_id) member::member() : lite_member_(false) , version_{ 0, 0, 0 } -{} +{ +} member::member(address member_address, boost::uuids::uuid uuid, @@ -70,19 +72,22 @@ member::member(address member_address, , attributes_(std::move(attr)) , address_map_(std::move(address_map)) , version_(v) -{} +{ +} member::member(address member_address) : address_(member_address) , lite_member_(false) , version_{ 0, 0, 0 } -{} +{ +} member::member(boost::uuids::uuid uuid) : uuid_(uuid) , lite_member_(false) , version_{ 0, 0, 0 } -{} +{ +} const address& member::get_address() const @@ -170,7 +175,8 @@ endpoint::endpoint(boost::uuids::uuid uuid, boost::optional

socket_address) : uuid_(uuid) , socket_address_(std::move(socket_address)) -{} +{ +} boost::uuids::uuid endpoint::get_uuid() const @@ -195,7 +201,8 @@ membership_event::membership_event( , member_(m) , event_type_(event_type) , members_(members_list) -{} +{ +} membership_event::~membership_event() = default; @@ -230,7 +237,8 @@ local_endpoint::local_endpoint(boost::uuids::uuid uuid, : endpoint(uuid, std::move(socket_address)) , name_(std::move(name)) , labels_(std::move(labels)) -{} +{ +} const std::string& local_endpoint::get_name() const diff --git a/hazelcast/src/hazelcast/client/compact.cpp b/hazelcast/src/hazelcast/client/compact.cpp index 5fd53b14a4..0f893cef49 100644 --- a/hazelcast/src/hazelcast/client/compact.cpp +++ b/hazelcast/src/hazelcast/client/compact.cpp @@ -88,7 +88,8 @@ generic_record_builder::generic_record_builder(std::string type_name) { } -generic_record_builder::generic_record_builder(std::shared_ptr record_schema) +generic_record_builder::generic_record_builder( + std::shared_ptr record_schema) : strategy_{ strategy::schema_bounded } , already_built_{ false } , writer_or_schema_{ std::move(record_schema) } @@ -134,9 +135,12 @@ generic_record_builder::build() boost::get(writer_or_schema_); already_built_ = true; - return generic_record{ std::make_shared(std::move(writer).build()), std::move(objects_) }; + return generic_record{ std::make_shared( + std::move(writer).build()), + std::move(objects_) }; } else { - std::shared_ptr schema = boost::get>(writer_or_schema_); + std::shared_ptr schema = + boost::get>(writer_or_schema_); if (strategy_ == strategy::schema_bounded) { const auto& fields = schema->fields(); @@ -289,7 +293,8 @@ generic_record_builder::set_timestamp_with_timezone( std::string field_name, boost::optional value) { - return write(std::move(field_name), value, field_kind::TIMESTAMP_WITH_TIMEZONE); + return write( + std::move(field_name), value, field_kind::TIMESTAMP_WITH_TIMEZONE); } generic_record_builder& @@ -313,15 +318,16 @@ generic_record_builder::set_array_of_boolean(std::string field_name, std::vector value) { return set_array_of_boolean( - std::move(field_name), boost::optional>(std::move(value))); + std::move(field_name), + boost::optional>(std::move(value))); } generic_record_builder& generic_record_builder::set_array_of_boolean(std::string field_name, - std::initializer_list value) + std::initializer_list value) { - return set_array_of_boolean( - std::move(field_name), std::vector(value)); + return set_array_of_boolean(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -329,23 +335,24 @@ generic_record_builder::set_array_of_int8( std::string field_name, boost::optional> value) { - return write(std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT8); + return write( + std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT8); } generic_record_builder& generic_record_builder::set_array_of_int8(std::string field_name, std::vector value) { - return set_array_of_int8(std::move(field_name), - boost::optional>(std::move(value))); + return set_array_of_int8( + std::move(field_name), + boost::optional>(std::move(value))); } generic_record_builder& generic_record_builder::set_array_of_int8(std::string field_name, - std::initializer_list value) + std::initializer_list value) { - return set_array_of_int8(std::move(field_name), - std::vector(value)); + return set_array_of_int8(std::move(field_name), std::vector(value)); } generic_record_builder& @@ -354,7 +361,7 @@ generic_record_builder::set_array_of_int16( boost::optional> value) { return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT16); + std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT16); } generic_record_builder& @@ -362,15 +369,16 @@ generic_record_builder::set_array_of_int16(std::string field_name, std::vector value) { return set_array_of_int16( - std::move(field_name), boost::optional>(std::move(value))); + std::move(field_name), + boost::optional>(std::move(value))); } generic_record_builder& generic_record_builder::set_array_of_int16(std::string field_name, - std::initializer_list value) + std::initializer_list value) { - return set_array_of_int16( - std::move(field_name), std::vector(value)); + return set_array_of_int16(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -379,7 +387,7 @@ generic_record_builder::set_array_of_int32( boost::optional> value) { return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT32); + std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT32); } generic_record_builder& @@ -387,15 +395,16 @@ generic_record_builder::set_array_of_int32(std::string field_name, std::vector value) { return set_array_of_int32( - std::move(field_name), boost::optional>(std::move(value))); + std::move(field_name), + boost::optional>(std::move(value))); } generic_record_builder& generic_record_builder::set_array_of_int32(std::string field_name, - std::initializer_list value) + std::initializer_list value) { - return set_array_of_int32( - std::move(field_name), std::vector(value)); + return set_array_of_int32(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -404,7 +413,7 @@ generic_record_builder::set_array_of_int64( boost::optional> value) { return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT64); + std::move(field_name), std::move(value), field_kind::ARRAY_OF_INT64); } generic_record_builder& @@ -412,15 +421,16 @@ generic_record_builder::set_array_of_int64(std::string field_name, std::vector value) { return set_array_of_int64( - std::move(field_name), boost::optional>(std::move(value))); + std::move(field_name), + boost::optional>(std::move(value))); } generic_record_builder& generic_record_builder::set_array_of_int64(std::string field_name, - std::initializer_list value) + std::initializer_list value) { - return set_array_of_int64( - std::move(field_name), std::vector(value)); + return set_array_of_int64(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -429,7 +439,7 @@ generic_record_builder::set_array_of_float32( boost::optional> value) { return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_FLOAT32); + std::move(field_name), std::move(value), field_kind::ARRAY_OF_FLOAT32); } generic_record_builder& @@ -437,15 +447,16 @@ generic_record_builder::set_array_of_float32(std::string field_name, std::vector value) { return set_array_of_float32( - std::move(field_name), boost::optional>(std::move(value))); + std::move(field_name), + boost::optional>(std::move(value))); } generic_record_builder& generic_record_builder::set_array_of_float32(std::string field_name, - std::initializer_list value) + std::initializer_list value) { - return set_array_of_float32( - std::move(field_name), std::vector(value)); + return set_array_of_float32(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -454,7 +465,7 @@ generic_record_builder::set_array_of_float64( boost::optional> value) { return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_FLOAT64); + std::move(field_name), std::move(value), field_kind::ARRAY_OF_FLOAT64); } generic_record_builder& @@ -462,30 +473,32 @@ generic_record_builder::set_array_of_float64(std::string field_name, std::vector value) { return set_array_of_float64( - std::move(field_name), boost::optional>(std::move(value))); + std::move(field_name), + boost::optional>(std::move(value))); } generic_record_builder& -generic_record_builder::set_array_of_float64(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_float64( + std::string field_name, + std::initializer_list value) { - return set_array_of_float64( - std::move(field_name), std::vector(value)); + return set_array_of_float64(std::move(field_name), + std::vector(value)); } template std::vector> to_nullable(std::vector value) { - std::vector> value_opt; + std::vector> value_opt; - value_opt.reserve(value.size()); + value_opt.reserve(value.size()); - transform(begin(value), end(value), back_inserter(value_opt), [](T value) { - return boost::optional{ value }; - }); + transform(begin(value), end(value), back_inserter(value_opt), [](T value) { + return boost::optional{ value }; + }); - return value_opt; + return value_opt; } generic_record_builder& @@ -507,11 +520,12 @@ generic_record_builder::set_array_of_nullable_boolean(std::string field_name, } generic_record_builder& -generic_record_builder::set_array_of_nullable_boolean(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_nullable_boolean( + std::string field_name, + std::initializer_list value) { - return set_array_of_nullable_boolean(std::move(field_name), - std::vector(value)); + return set_array_of_nullable_boolean(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -519,8 +533,9 @@ generic_record_builder::set_array_of_nullable_int8( std::string field_name, boost::optional>> value) { - return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_NULLABLE_INT8); + return write(std::move(field_name), + std::move(value), + field_kind::ARRAY_OF_NULLABLE_INT8); } generic_record_builder& @@ -532,11 +547,12 @@ generic_record_builder::set_array_of_nullable_int8(std::string field_name, } generic_record_builder& -generic_record_builder::set_array_of_nullable_int8(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_nullable_int8( + std::string field_name, + std::initializer_list value) { - return set_array_of_nullable_int8(std::move(field_name), - std::vector(value)); + return set_array_of_nullable_int8(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -544,8 +560,9 @@ generic_record_builder::set_array_of_nullable_int16( std::string field_name, boost::optional>> value) { - return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_NULLABLE_INT16); + return write(std::move(field_name), + std::move(value), + field_kind::ARRAY_OF_NULLABLE_INT16); } generic_record_builder& @@ -557,11 +574,12 @@ generic_record_builder::set_array_of_nullable_int16(std::string field_name, } generic_record_builder& -generic_record_builder::set_array_of_nullable_int16(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_nullable_int16( + std::string field_name, + std::initializer_list value) { - return set_array_of_nullable_int16(std::move(field_name), - std::vector(value)); + return set_array_of_nullable_int16(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -569,8 +587,9 @@ generic_record_builder::set_array_of_nullable_int32( std::string field_name, boost::optional>> value) { - return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_NULLABLE_INT32); + return write(std::move(field_name), + std::move(value), + field_kind::ARRAY_OF_NULLABLE_INT32); } generic_record_builder& @@ -582,11 +601,12 @@ generic_record_builder::set_array_of_nullable_int32(std::string field_name, } generic_record_builder& -generic_record_builder::set_array_of_nullable_int32(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_nullable_int32( + std::string field_name, + std::initializer_list value) { - return set_array_of_nullable_int32(std::move(field_name), - std::vector(value)); + return set_array_of_nullable_int32(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -594,8 +614,9 @@ generic_record_builder::set_array_of_nullable_int64( std::string field_name, boost::optional>> value) { - return write( - std::move(field_name), std::move(value), field_kind::ARRAY_OF_NULLABLE_INT64); + return write(std::move(field_name), + std::move(value), + field_kind::ARRAY_OF_NULLABLE_INT64); } generic_record_builder& @@ -607,11 +628,12 @@ generic_record_builder::set_array_of_nullable_int64(std::string field_name, } generic_record_builder& -generic_record_builder::set_array_of_nullable_int64(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_nullable_int64( + std::string field_name, + std::initializer_list value) { - return set_array_of_nullable_int64(std::move(field_name), - std::vector(value)); + return set_array_of_nullable_int64(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -633,11 +655,12 @@ generic_record_builder::set_array_of_nullable_float32(std::string field_name, } generic_record_builder& -generic_record_builder::set_array_of_nullable_float32(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_nullable_float32( + std::string field_name, + std::initializer_list value) { - return set_array_of_nullable_float32(std::move(field_name), - std::vector(value)); + return set_array_of_nullable_float32(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -659,11 +682,12 @@ generic_record_builder::set_array_of_nullable_float64(std::string field_name, } generic_record_builder& -generic_record_builder::set_array_of_nullable_float64(std::string field_name, - std::initializer_list value) +generic_record_builder::set_array_of_nullable_float64( + std::string field_name, + std::initializer_list value) { - return set_array_of_nullable_float64(std::move(field_name), - std::vector(value)); + return set_array_of_nullable_float64(std::move(field_name), + std::vector(value)); } generic_record_builder& @@ -689,7 +713,8 @@ generic_record_builder::set_array_of_time( std::string field_name, boost::optional>> value) { - return write(std::move(field_name), std::move(value), field_kind::ARRAY_OF_TIME); + return write( + std::move(field_name), std::move(value), field_kind::ARRAY_OF_TIME); } generic_record_builder& @@ -697,7 +722,8 @@ generic_record_builder::set_array_of_date( std::string field_name, boost::optional>> value) { - return write(std::move(field_name), std::move(value), field_kind::ARRAY_OF_DATE); + return write( + std::move(field_name), std::move(value), field_kind::ARRAY_OF_DATE); } generic_record_builder& @@ -1590,8 +1616,12 @@ operator==(const generic_record& x, const generic_record& y) boost::any_cast>>>(y); }, - [](const boost::any& /*x*/, const boost::any& /*y*/) { return false; }, //[31] - [](const boost::any& /*x*/, const boost::any& /*y*/) { return false; }, //[32] + [](const boost::any& /*x*/, const boost::any& /*y*/) { + return false; + }, //[31] + [](const boost::any& /*x*/, const boost::any& /*y*/) { + return false; + }, //[32] [](const boost::any& x, const boost::any& y) { //[33] NULLABLE_BOOLEAN return boost::any_cast>(x) == boost::any_cast>(y); @@ -1862,12 +1892,14 @@ compact_writer::compact_writer( pimpl::default_compact_writer* default_compact_writer) : default_compact_writer(default_compact_writer) , schema_writer(nullptr) -{} +{ +} compact_writer::compact_writer(pimpl::schema_writer* schema_writer) : default_compact_writer(nullptr) , schema_writer(schema_writer) -{} +{ +} void compact_writer::write_boolean(const std::string& field_name, bool value) @@ -3333,7 +3365,7 @@ rabin_finger_print::fingerprint64(uint64_t fp, byte b) uint64_t rabin_finger_print::fingerprint64(uint64_t fp, int32_t v) { - fp = fingerprint64(fp, (byte)((v)&0xFF)); + fp = fingerprint64(fp, (byte)((v) & 0xFF)); fp = fingerprint64(fp, (byte)((v >> 8) & 0xFF)); fp = fingerprint64(fp, (byte)((v >> 16) & 0xFF)); fp = fingerprint64(fp, (byte)((v >> 24) & 0xFF)); @@ -3549,7 +3581,8 @@ compact_util::exception_for_unexpected_null_value_in_array( schema_writer::schema_writer(std::string type_name) : type_name_(std::move(type_name)) -{} +{ +} void schema_writer::add_field(std::string field_name, enum field_kind kind) @@ -3559,7 +3592,8 @@ schema_writer::add_field(std::string field_name, enum field_kind kind) "Field with the name '" + field_name + "' already exists." }); } - field_definition_map_.emplace(std::move(field_name), field_descriptor{ kind }); + field_definition_map_.emplace(std::move(field_name), + field_descriptor{ kind }); } schema @@ -3793,8 +3827,7 @@ compact_stream_serializer::read_generic_record(object_data_input& in) throw exception::hazelcast_serialization{ "compact_stream_serializer::read_generic_record", boost::str( - boost::format( - "The schema can not be found with id %1%") % + boost::format("The schema can not be found with id %1%") % schema_id) }; } @@ -3802,7 +3835,8 @@ compact_stream_serializer::read_generic_record(object_data_input& in) compact::compact_reader reader = create_compact_reader(*this, in, *sch); generic_record::generic_record_builder builder{ sch }; - for (const std::pair& p : sch->fields()) { + for (const std::pair& p : + sch->fields()) { const std::string& field_name = p.first; const field_descriptor& descriptor = p.second; field_operations::get(descriptor.kind) @@ -3840,7 +3874,8 @@ compact_stream_serializer::write_generic_record( field_kind_based_operations::field_kind_based_operations() : kind_size_in_byte_func(DEFAULT_KIND_SIZE_IN_BYTES) -{} +{ +} field_kind_based_operations::field_kind_based_operations( kind_size_in_bytes_fn kind_size_fn, @@ -3851,7 +3886,8 @@ field_kind_based_operations::field_kind_based_operations( , write_field_from_record_to_writer(std::move(write_fn)) , read_generic_record_or_primitive(std::move(read_fn)) , write_json_formatted_field(std::move(json_fn)) -{} +{ +} const field_kind_based_operations& field_operations::get(field_kind kind) diff --git a/hazelcast/src/hazelcast/client/config.cpp b/hazelcast/src/hazelcast/client/config.cpp index 460e5b863e..231677531c 100644 --- a/hazelcast/src/hazelcast/client/config.cpp +++ b/hazelcast/src/hazelcast/client/config.cpp @@ -40,7 +40,8 @@ namespace hazelcast { namespace client { serialization_config::serialization_config() : version_(0) -{} +{ +} int serialization_config::get_portable_version() const @@ -88,7 +89,8 @@ ssl_config::ssl_config() : enabled_(false) , ssl_protocol_(tlsv12) #endif -{} +{ +} #ifdef HZ_BUILD_WITH_SSL ssl_config& @@ -181,7 +183,8 @@ client_flake_id_generator_config::client_flake_id_generator_config( , prefetch_count_(client_flake_id_generator_config::DEFAULT_PREFETCH_COUNT) , prefetch_validity_duration_( client_flake_id_generator_config::DEFAULT_PREFETCH_VALIDITY_MILLIS) -{} +{ +} const std::string& client_flake_id_generator_config::get_name() const @@ -319,7 +322,8 @@ connection_retry_config::set_jitter(double jitter) client_network_config::client_network_config() : connection_timeout_(5000) , smart_routing_(true) -{} +{ +} ssl_config& client_network_config::get_ssl_config() @@ -431,7 +435,8 @@ client_network_config::use_public_address(bool should_use_public_address) client_connection_strategy_config::client_connection_strategy_config() : async_start_(false) , reconnect_mode_(ON) -{} +{ +} client_connection_strategy_config::reconnect_mode client_connection_strategy_config::get_reconnect_mode() const @@ -483,7 +488,8 @@ reliable_topic_config::reliable_topic_config(std::string topic_name) , name_(std::move(topic_name)) -{} +{ +} const std::string& reliable_topic_config::get_name() const @@ -517,7 +523,8 @@ socket_options::socket_options() , reuse_address_(true) , linger_seconds_(3) , buffer_size_(DEFAULT_BUFFER_SIZE_BYTE) -{} +{ +} bool socket_options::is_tcp_no_delay() const @@ -589,7 +596,8 @@ client_aws_config::client_aws_config() , region_("us-east-1") , host_header_("ec2.amazonaws.com") , inside_aws_(false) -{} +{ +} const std::string& client_aws_config::get_access_key() const @@ -806,24 +814,28 @@ const index_config::bitmap_index_options::unique_key_transformation index_config::bitmap_index_options::bitmap_index_options() : key(DEFAULT_KEY) , transformation(DEFAULT_TRANSFORMATION) -{} +{ +} const index_config::index_type index_config::DEFAULT_TYPE = index_config::index_type::SORTED; index_config::index_config(index_config::index_type type) : type(type) -{} +{ +} void index_config::add_attributes() -{} +{ +} eviction_config::eviction_config() : size_(DEFAULT_MAX_ENTRY_COUNT) , max_size_policy_(DEFAULT_MAX_SIZE_POLICY) , eviction_policy_(DEFAULT_EVICTION_POLICY) -{} +{ +} int32_t eviction_config::get_size() const @@ -892,7 +904,8 @@ near_cache_config::near_cache_config() , local_update_policy_(INVALIDATE) , invalidate_on_change_(true) , cache_local_entries_(false) -{} +{ +} near_cache_config::near_cache_config(const std::string& cache_name) : near_cache_config() @@ -1050,7 +1063,8 @@ client_config::client_config() , redo_operation_(false) , socket_interceptor_() , executor_pool_size_(-1) -{} +{ +} client_config::client_config(client_config&& rhs) = default; @@ -1393,7 +1407,8 @@ username_password_credentials::username_password_credentials( const std::string& password) : credentials(name) , password_(password) -{} +{ +} const std::string& username_password_credentials::password() const @@ -1422,7 +1437,8 @@ token_credentials::type() const token_credentials::token_credentials(const std::vector& token) : credentials(token.empty() ? "" : "") , token_(token) -{} +{ +} credentials::~credentials() {} @@ -1434,7 +1450,8 @@ credentials::name() const credentials::credentials(const std::string& name) : name_(name) -{} +{ +} } // namespace security } // namespace client } // namespace hazelcast diff --git a/hazelcast/src/hazelcast/client/discovery.cpp b/hazelcast/src/hazelcast/client/discovery.cpp index ec1ce96b8e..e2b6e4ec96 100644 --- a/hazelcast/src/hazelcast/client/discovery.cpp +++ b/hazelcast/src/hazelcast/client/discovery.cpp @@ -56,7 +56,8 @@ ec2_request_signer::ec2_request_signer( : aws_config_(aws_config) , timestamp_(timestamp) , endpoint_(endpoint) -{} +{ +} ec2_request_signer::~ec2_request_signer() = default; @@ -264,12 +265,13 @@ ec2_request_signer::hmac_sh_a256_bytes(const void* key_buffer, { #if OPENSSL_VERSION_NUMBER >= 0x30000000L - //https://www.openssl.org/docs/man3.0/man7/migration_guide.html + // https://www.openssl.org/docs/man3.0/man7/migration_guide.html size_t len = 32; - EVP_MD_CTX *mdctx; + EVP_MD_CTX* mdctx; mdctx = EVP_MD_CTX_new(); - EVP_PKEY *skey = NULL; - skey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, (const unsigned char *)key_buffer, key_len); + EVP_PKEY* skey = NULL; + skey = EVP_PKEY_new_mac_key( + EVP_PKEY_HMAC, NULL, (const unsigned char*)key_buffer, key_len); EVP_DigestSignInit(mdctx, NULL, EVP_sha256(), NULL, skey); EVP_DigestSignUpdate(mdctx, data, data_len); EVP_DigestSignFinal(mdctx, hash, &len); diff --git a/hazelcast/src/hazelcast/client/metrics.cpp b/hazelcast/src/hazelcast/client/metrics.cpp index b35e972f20..e495b75072 100644 --- a/hazelcast/src/hazelcast/client/metrics.cpp +++ b/hazelcast/src/hazelcast/client/metrics.cpp @@ -146,7 +146,8 @@ metric_descriptor::metric_descriptor(std::string prefix, , discriminator_{ std::move(discriminator) } , discriminator_value_{ std::move(discriminator_value) } , unit_{ unit } -{} +{ +} metric_descriptor::metric_descriptor(std::string prefix, std::string metric, @@ -156,7 +157,8 @@ metric_descriptor::metric_descriptor(std::string prefix, , discriminator_{} , discriminator_value_{} , unit_{ unit } -{} +{ +} const std::string& metric_descriptor::prefix() const diff --git a/hazelcast/src/hazelcast/client/near_cache.cpp b/hazelcast/src/hazelcast/client/near_cache.cpp index 737723b6ee..deaf0d0051 100644 --- a/hazelcast/src/hazelcast/client/near_cache.cpp +++ b/hazelcast/src/hazelcast/client/near_cache.cpp @@ -31,7 +31,8 @@ NearCacheManager::NearCacheManager( : execution_service_(es) , serialization_service_(ss) , logger_(lg) -{} +{ +} bool NearCacheManager::clear_near_cache(const std::string& name) @@ -94,7 +95,8 @@ NearCacheDataRecord::NearCacheDataRecord( : AbstractNearCacheRecord(data_value, create_time, expiry_time) -{} +{ +} } // namespace record KeyStateMarkerImpl::KeyStateMarkerImpl(int count) @@ -199,11 +201,13 @@ TrueMarkerImpl::try_remove(const serialization::pimpl::data& /* key */) void TrueMarkerImpl::force_unmark(const serialization::pimpl::data& /* key */) -{} +{ +} void TrueMarkerImpl::init() -{} +{ +} const std::unique_ptr KeyStateMarker::TRUE_MARKER = std::unique_ptr(new TrueMarkerImpl()); diff --git a/hazelcast/src/hazelcast/client/network.cpp b/hazelcast/src/hazelcast/client/network.cpp index 91c9369a1b..4f9c3b69cb 100644 --- a/hazelcast/src/hazelcast/client/network.cpp +++ b/hazelcast/src/hazelcast/client/network.cpp @@ -157,8 +157,7 @@ ClientConnectionManagerImpl::schedule_connect_to_all_members() return; } - connect_to_members_timer_->expires_after( - boost::asio::chrono::seconds(1)); + connect_to_members_timer_->expires_after(boost::asio::chrono::seconds(1)); connect_to_members_timer_->async_wait([=](boost::system::error_code ec) { if (ec == boost::asio::error::operation_aborted) { return; @@ -1156,7 +1155,8 @@ ReadHandler::ReadHandler(Connection& connection, size_t buffer_size) , byte_buffer(buffer, buffer_size) , builder_(connection) , last_read_time_(std::chrono::steady_clock::now().time_since_epoch()) -{} +{ +} ReadHandler::~ReadHandler() { @@ -1703,8 +1703,9 @@ wait_strategy::sleep() current_backoff_millis_.count() * jitter_ * (2.0 * random_(random_generator_) - 1.0))); - actual_sleep_time = (std::min)( - actual_sleep_time, cluster_connect_timeout_millis_ - time_passed); + actual_sleep_time = + (std::min)(actual_sleep_time, + cluster_connect_timeout_millis_ - time_passed); HZ_LOG( logger_, @@ -1734,7 +1735,8 @@ SocketFactory::SocketFactory(spi::ClientContext& client_context, : client_context_(client_context) , io_(io) , io_resolver_(resolver) -{} +{ +} bool SocketFactory::start() @@ -1847,7 +1849,8 @@ SSLSocket::SSLSocket(boost::asio::io_context& io_service, io_service, connect_timeout_in_millis, ssl_context) -{} +{ +} std::vector SSLSocket::get_ciphers() @@ -1897,7 +1900,8 @@ TcpSocket::TcpSocket(boost::asio::io_context& io, socket_options, io, connect_timeout_in_millis) -{} +{ +} } // namespace socket } // namespace internal diff --git a/hazelcast/src/hazelcast/client/protocol.cpp b/hazelcast/src/hazelcast/client/protocol.cpp index 5a7c2655cd..b2b0021fb6 100644 --- a/hazelcast/src/hazelcast/client/protocol.cpp +++ b/hazelcast/src/hazelcast/client/protocol.cpp @@ -57,7 +57,8 @@ const ClientMessage::frame_header_type ClientMessage::END_FRAME{ ClientMessage::ClientMessage() : retryable_(false) , contains_serialized_data_in_request_(false) -{} +{ +} ClientMessage::ClientMessage(size_t initial_frame_size, bool is_fingle_frame) : retryable_(false) @@ -111,8 +112,8 @@ ClientMessage::set( const std::vector>& values, bool is_final) { - auto* f = - reinterpret_cast(wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); + auto* f = reinterpret_cast( + wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); f->frame_len = values.size() * (UUID_SIZE + INT64_SIZE) + SIZE_OF_FRAME_LENGTH_AND_FLAGS; f->flags = is_final ? IS_FINAL_FLAG : DEFAULT_FLAGS; @@ -126,8 +127,8 @@ template<> void ClientMessage::set(const std::vector& values, bool is_final) { - auto* h = - reinterpret_cast(wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); + auto* h = reinterpret_cast( + wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); h->frame_len = SIZE_OF_FRAME_LENGTH_AND_FLAGS + values.size() * UUID_SIZE; h->flags = is_final ? IS_FINAL_FLAG : DEFAULT_FLAGS; for (auto& v : values) { @@ -171,8 +172,8 @@ ClientMessage::set(const codec::holder::paging_predicate_holder& p, { add_begin_frame(); - auto f = - reinterpret_cast(wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); + auto f = reinterpret_cast( + wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); f->frame_len = SIZE_OF_FRAME_LENGTH_AND_FLAGS + 2 * INT32_SIZE + INT8_SIZE; f->flags = DEFAULT_FLAGS; set(p.page_size); @@ -376,7 +377,8 @@ operator<<(std::ostream& os, const ClientMessage& msg) void ClientMessage::set(unsigned char* /* memory */, boost::uuids::uuid uuid) { - static_assert(uuid.size() == util::Bits::UUID_SIZE_IN_BYTES, "uuid size must be 16"); + static_assert(uuid.size() == util::Bits::UUID_SIZE_IN_BYTES, + "uuid size must be 16"); std::memcpy(wr_ptr(uuid.size()), &uuid.data[0], uuid.size()); } @@ -387,8 +389,8 @@ ClientMessage::fast_forward_to_end_frame() // in the beginning of the decode method int number_expected_frames = 1; while (number_expected_frames) { - auto* f = - reinterpret_cast(rd_ptr(sizeof(frame_header_type))); + auto* f = reinterpret_cast( + rd_ptr(sizeof(frame_header_type))); int16_t flags = f->flags; if (is_flag_set(flags, END_DATA_STRUCTURE_FLAG)) { @@ -445,8 +447,8 @@ ClientMessage::set(const cp::raft_group_id& o, bool is_final) { add_begin_frame(); - auto f = - reinterpret_cast(wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); + auto f = reinterpret_cast( + wr_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); f->frame_len = SIZE_OF_FRAME_LENGTH_AND_FLAGS + 2 * INT64_SIZE; f->flags = DEFAULT_FLAGS; set(o.seed); @@ -465,8 +467,8 @@ ClientMessage::get() rd_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS); // skip header of the frame - auto f = - reinterpret_cast(rd_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); + auto f = reinterpret_cast( + rd_ptr(SIZE_OF_FRAME_LENGTH_AND_FLAGS)); auto seed = get(); auto id = get(); rd_ptr(static_cast(f->frame_len) - SIZE_OF_FRAME_LENGTH_AND_FLAGS - @@ -765,7 +767,8 @@ UsernamePasswordCredentials::UsernamePasswordCredentials( const std::string& password) : name_(principal) , password_(password) -{} +{ +} const std::string& UsernamePasswordCredentials::get_name() const @@ -829,12 +832,14 @@ custom_type_factory::create_sql_column_metadata(std::string name, } if (is_nullable_exists) { - return sql_column_metadata{ - std::move(name), static_cast(type), nullability}; + return sql_column_metadata{ std::move(name), + static_cast(type), + nullability }; } - return sql_column_metadata{ - std::move(name), static_cast(type), true}; + return sql_column_metadata{ std::move(name), + static_cast(type), + true }; } std::shared_ptr @@ -844,9 +849,8 @@ sql_page_codec::decode(ClientMessage& msg, // begin frame msg.skip_frame(); - bool last = - msg.peek(ClientMessage::SIZE_OF_FRAME_LENGTH_AND_FLAGS + - 1)[ClientMessage::SIZE_OF_FRAME_LENGTH_AND_FLAGS] == 1; + bool last = msg.peek(ClientMessage::SIZE_OF_FRAME_LENGTH_AND_FLAGS + + 1)[ClientMessage::SIZE_OF_FRAME_LENGTH_AND_FLAGS] == 1; msg.skip_frame(); @@ -905,46 +909,38 @@ sql_page_codec::decode_column_values(ClientMessage& msg, builtin::list_cn_fixed_size_codec::decode(msg)); case sql::sql_column_type::date: return to_vector_of_any( - builtin::list_cn_fixed_size_codec::decode( - msg)); + builtin::list_cn_fixed_size_codec::decode(msg)); case sql::sql_column_type::time: return to_vector_of_any( - builtin::list_cn_fixed_size_codec::decode( - msg)); + builtin::list_cn_fixed_size_codec::decode(msg)); case sql::sql_column_type::timestamp: return to_vector_of_any( - builtin::list_cn_fixed_size_codec::decode< - local_date_time>(msg)); + builtin::list_cn_fixed_size_codec::decode(msg)); case sql::sql_column_type::timestamp_with_timezone: return to_vector_of_any( - builtin::list_cn_fixed_size_codec::decode< - offset_date_time>(msg)); + builtin::list_cn_fixed_size_codec::decode(msg)); case sql::sql_column_type::decimal: return to_vector_of_any( - builtin::list_cn_fixed_size_codec::decode( - msg)); + builtin::list_cn_fixed_size_codec::decode(msg)); case sql::sql_column_type::null: { msg.skip_frame_header_bytes(); auto size = msg.get(); - return - std::vector(static_cast(size)); + return std::vector(static_cast(size)); } case sql::sql_column_type::object: return to_vector_of_any( - msg.get>>()); + msg.get< + std::vector>>()); case sql::sql_column_type::json: return to_vector_of_any( msg.get>>()); default: - throw exception::illegal_state( - "ClientMessage::get", - (boost::format("Unknown type %1%") % - static_cast(column_type)) - .str()); + throw exception::illegal_state("ClientMessage::get", + (boost::format("Unknown type %1%") % + static_cast(column_type)) + .str()); } - } } // namespace builtin diff --git a/hazelcast/src/hazelcast/client/proxy.cpp b/hazelcast/src/hazelcast/client/proxy.cpp index a9b6f732d8..aa31ac769a 100644 --- a/hazelcast/src/hazelcast/client/proxy.cpp +++ b/hazelcast/src/hazelcast/client/proxy.cpp @@ -44,7 +44,7 @@ reliable_topic::reliable_topic(const std::string& instance_name, spi::ClientContext* context) : proxy::ProxyImpl(reliable_topic::SERVICE_NAME, instance_name, context) , execution_service_( - context->get_client_execution_service().shared_from_this()) + context->get_client_execution_service().shared_from_this()) , executor_(execution_service_->get_user_executor()) , logger_(context->get_logger()) { @@ -104,13 +104,15 @@ reliable_listener::reliable_listener(bool loss_tolerant, int64_t initial_sequence_id) : loss_tolerant_(loss_tolerant) , initial_sequence_id_(initial_sequence_id) -{} +{ +} } // namespace topic namespace impl { ClientLockReferenceIdGenerator::ClientLockReferenceIdGenerator() : reference_id_counter_(0) -{} +{ +} int64_t ClientLockReferenceIdGenerator::get_next_reference_id() @@ -373,7 +375,8 @@ MultiMapImpl::MultiMapEntryListenerMessageCodec:: MultiMapEntryListenerMessageCodec(std::string name, bool include_value) : name_(std::move(name)) , include_value_(include_value) -{} +{ +} protocol::ClientMessage MultiMapImpl::MultiMapEntryListenerMessageCodec::encode_add_request( @@ -414,7 +417,8 @@ MultiMapImpl::MultiMapEntryListenerToKeyCodec::MultiMapEntryListenerToKeyCodec( : name_(std::move(name)) , include_value_(include_value) , key_(std::move(key)) -{} +{ +} const std::shared_ptr> PNCounterImpl::EMPTY_ADDRESS_LIST(new std::unordered_set()); @@ -427,7 +431,8 @@ PNCounterImpl::PNCounterImpl(const std::string& service_name, , observed_clock_( std::shared_ptr(new impl::vector_clock())) , logger_(context->get_logger()) -{} +{ +} std::ostream& operator<<(std::ostream& os, const PNCounterImpl& proxy) @@ -984,7 +989,8 @@ IListImpl::ListListenerMessageCodec::ListListenerMessageCodec( bool include_value) : name_(std::move(name)) , include_value_(include_value) -{} +{ +} protocol::ClientMessage IListImpl::ListListenerMessageCodec::encode_add_request(bool local_only) const @@ -1006,7 +1012,8 @@ flake_id_generator_impl::Block::Block(IdBatch&& id_batch, : id_batch_(id_batch) , invalid_since_(std::chrono::steady_clock::now() + validity) , num_returned_(0) -{} +{ +} int64_t flake_id_generator_impl::Block::next() @@ -1052,7 +1059,8 @@ flake_id_generator_impl::IdBatch::IdBatch(int64_t base, : base_(base) , increment_(increment) , batch_size_(batch_size) -{} +{ +} flake_id_generator_impl::IdBatch::IdIterator& flake_id_generator_impl::IdBatch::end() @@ -1074,7 +1082,8 @@ flake_id_generator_impl::IdBatch::IdIterator::IdIterator( : base2_(base2) , increment_(increment) , remaining_(remaining) -{} +{ +} bool flake_id_generator_impl::IdBatch::IdIterator::operator==( @@ -1100,7 +1109,8 @@ flake_id_generator_impl::IdBatch::IdIterator::IdIterator() : base2_(-1) , increment_(-1) , remaining_(-1) -{} +{ +} flake_id_generator_impl::IdBatch::IdIterator& flake_id_generator_impl::IdBatch::IdIterator::operator++() @@ -1355,7 +1365,8 @@ IQueueImpl::QueueListenerMessageCodec::QueueListenerMessageCodec( bool include_value) : name_(std::move(name)) , include_value_(include_value) -{} +{ +} protocol::ClientMessage IQueueImpl::QueueListenerMessageCodec::encode_add_request(bool local_only) const @@ -1377,7 +1388,8 @@ ProxyImpl::ProxyImpl(const std::string& service_name, spi::ClientContext* context) : ClientProxy(object_name, service_name, *context) , SerializingProxy(*context, object_name) -{} +{ +} ProxyImpl::~ProxyImpl() = default; @@ -1387,7 +1399,8 @@ SerializingProxy::SerializingProxy(spi::ClientContext& context, , partition_service_(context.get_partition_service()) , object_name_(object_name) , client_context_(context) -{} +{ +} int SerializingProxy::get_partition_id(const serialization::pimpl::data& key) @@ -1516,7 +1529,8 @@ PartitionSpecificClientProxy::PartitionSpecificClientProxy( spi::ClientContext* context) : ProxyImpl(service_name, object_name, context) , partition_id_(-1) -{} +{ +} void PartitionSpecificClientProxy::on_initialize() @@ -1530,7 +1544,8 @@ PartitionSpecificClientProxy::on_initialize() IMapImpl::IMapImpl(const std::string& instance_name, spi::ClientContext* context) : ProxyImpl("hz:impl:mapService", instance_name, context) -{} +{ +} boost::future IMapImpl::contains_key(const serialization::pimpl::data& key) @@ -2089,7 +2104,8 @@ IMapImpl::MapEntryListenerMessageCodec::MapEntryListenerMessageCodec( : name_(std::move(name)) , include_value_(include_value) , listener_flags_(listener_flags) -{} +{ +} protocol::ClientMessage IMapImpl::MapEntryListenerMessageCodec::encode_add_request( @@ -2135,7 +2151,8 @@ IMapImpl::MapEntryListenerToKeyCodec::MapEntryListenerToKeyCodec( , include_value_(include_value) , listener_flags_(listener_flags) , key_(std::move(key)) -{} +{ +} IMapImpl::MapEntryListenerWithPredicateMessageCodec:: MapEntryListenerWithPredicateMessageCodec( @@ -2147,7 +2164,8 @@ IMapImpl::MapEntryListenerWithPredicateMessageCodec:: , include_value_(include_value) , listener_flags_(listener_flags) , predicate_(std::move(predicate)) -{} +{ +} protocol::ClientMessage IMapImpl::MapEntryListenerWithPredicateMessageCodec::encode_add_request( @@ -2173,7 +2191,8 @@ TransactionalQueueImpl::TransactionalQueueImpl( const std::string& name, txn::TransactionProxy& transaction_proxy) : TransactionalObject(iqueue::SERVICE_NAME, name, transaction_proxy) -{} +{ +} boost::future TransactionalQueueImpl::offer(const serialization::pimpl::data& e, @@ -2320,7 +2339,8 @@ ISetImpl::SetListenerMessageCodec::SetListenerMessageCodec(std::string name, bool include_value) : name_(std::move(name)) , include_value_(include_value) -{} +{ +} protocol::ClientMessage ISetImpl::SetListenerMessageCodec::encode_add_request(bool local_only) const @@ -2341,7 +2361,8 @@ ITopicImpl::ITopicImpl(const std::string& instance_name, spi::ClientContext* context) : proxy::ProxyImpl("hz:impl:topicService", instance_name, context) , partition_id_(get_partition_id(to_data(instance_name))) -{} +{ +} boost::future ITopicImpl::publish(const serialization::pimpl::data& data) @@ -2375,7 +2396,8 @@ ITopicImpl::create_item_listener_codec() ITopicImpl::TopicListenerMessageCodec::TopicListenerMessageCodec( std::string name) : name_(std::move(name)) -{} +{ +} protocol::ClientMessage ITopicImpl::TopicListenerMessageCodec::encode_add_request(bool local_only) const @@ -2396,7 +2418,8 @@ ReplicatedMapImpl::ReplicatedMapImpl(const std::string& service_name, spi::ClientContext* context) : ProxyImpl(service_name, object_name, context) , target_partition_id_(-1) -{} +{ +} const int32_t RingbufferImpl::MAX_BATCH_SIZE{ 1000 }; } // namespace proxy @@ -2498,7 +2521,8 @@ data_entry_view::data_entry_view(serialization::pimpl::data&& key, , version_(version) , ttl_(ttl) , max_idle_(max_idle) -{} +{ +} } // namespace map namespace topic { @@ -2506,7 +2530,8 @@ namespace impl { namespace reliable { ReliableTopicMessage::ReliableTopicMessage() : publish_time_(std::chrono::system_clock::now()) -{} +{ +} ReliableTopicMessage::ReliableTopicMessage( hazelcast::client::serialization::pimpl::data&& payload_data, @@ -2595,7 +2620,8 @@ entry_event::entry_event(const std::string& name, , value_(std::move(value)) , old_value_(std::move(old_value)) , merging_value_(std::move(merging_value)) -{} +{ +} const typed_data& entry_event::get_key() const @@ -2659,7 +2685,8 @@ map_event::map_event(member&& member, , event_type_(event_type) , name_(name) , number_of_entries_affected_(number_of_entries_affected) -{} +{ +} const member& map_event::get_member() const @@ -2701,7 +2728,8 @@ item_event_base::item_event_base(const std::string& name, : name_(name) , member_(member) , event_type_(event_type) -{} +{ +} const member& item_event_base::get_member() const @@ -2726,6 +2754,7 @@ item_event_base::~item_event_base() = default; flake_id_generator::flake_id_generator(const std::string& object_name, spi::ClientContext* context) : flake_id_generator_impl(SERVICE_NAME, object_name, context) -{} +{ +} } // namespace client } // namespace hazelcast diff --git a/hazelcast/src/hazelcast/client/query.cpp b/hazelcast/src/hazelcast/client/query.cpp index 51678582e5..137d23d699 100644 --- a/hazelcast/src/hazelcast/client/query.cpp +++ b/hazelcast/src/hazelcast/client/query.cpp @@ -27,7 +27,8 @@ base_predicate::base_predicate(hazelcast_client& client) : out_stream(spi::ClientContext(client) .get_serialization_service() .new_output_stream()) -{} +{ +} named_predicate::named_predicate(hazelcast_client& client, const std::string& attribute_name) @@ -75,11 +76,13 @@ regex_predicate::regex_predicate(hazelcast_client& client, true_predicate::true_predicate(hazelcast_client& client) : base_predicate(client) -{} +{ +} false_predicate::false_predicate(hazelcast_client& client) : base_predicate(client) -{} +{ +} } // namespace query } // namespace client } // namespace hazelcast diff --git a/hazelcast/src/hazelcast/client/serialization.cpp b/hazelcast/src/hazelcast/client/serialization.cpp index c95c7d20fb..1397c2c493 100644 --- a/hazelcast/src/hazelcast/client/serialization.cpp +++ b/hazelcast/src/hazelcast/client/serialization.cpp @@ -31,7 +31,8 @@ namespace hazelcast { namespace client { hazelcast_json_value::hazelcast_json_value(std::string json_string) : json_string_(std::move(json_string)) -{} +{ +} hazelcast_json_value::~hazelcast_json_value() = default; @@ -68,14 +69,16 @@ operator<<(std::ostream& os, const hazelcast_json_value& value) typed_data::typed_data() : ss_(nullptr) -{} +{ +} typed_data::typed_data( serialization::pimpl::data d, serialization::pimpl::SerializationService& serialization_service) : data_(std::move(d)) , ss_(&serialization_service) -{} +{ +} serialization::pimpl::object_type typed_data::get_type() const @@ -104,14 +107,16 @@ portable_writer::portable_writer( : default_portable_writer_(default_portable_writer) , class_definition_writer_(nullptr) , is_default_writer_(true) -{} +{ +} portable_writer::portable_writer( pimpl::ClassDefinitionWriter* class_definition_writer) : default_portable_writer_(nullptr) , class_definition_writer_(class_definition_writer) , is_default_writer_(false) -{} +{ +} void portable_writer::end() @@ -137,7 +142,8 @@ ClassDefinitionBuilder::ClassDefinitionBuilder(int factory_id, , version_(version) , index_(0) , done_(false) -{} +{ +} ClassDefinitionBuilder& ClassDefinitionBuilder::add_portable_field(const std::string& field_name, @@ -259,7 +265,8 @@ FieldDefinition::FieldDefinition() , class_id_(0) , factory_id_(0) , version_(-1) -{} +{ +} FieldDefinition::FieldDefinition(int index, const std::string& field_name, @@ -271,7 +278,8 @@ FieldDefinition::FieldDefinition(int index, , class_id_(0) , factory_id_(0) , version_(version) -{} +{ +} FieldDefinition::FieldDefinition(int index, const std::string& field_name, @@ -285,7 +293,8 @@ FieldDefinition::FieldDefinition(int index, , class_id_(class_id) , factory_id_(factory_id) , version_(version) -{} +{ +} const field_type& FieldDefinition::get_type() const @@ -377,7 +386,8 @@ object_data_input::object_data_input( , compact_serializer_(compact_ser) , data_serializer_(data_ser) , global_serializer_(std::move(global_serializer)) -{} +{ +} object_data_output::object_data_output( boost::endian::order byte_order, @@ -389,7 +399,8 @@ object_data_output::object_data_output( , portable_serializer_(portable_ser) , compact_serializer_(compact_ser) , global_serializer_(std::move(global_serializer)) -{} +{ +} portable_reader::portable_reader(pimpl::PortableSerializer& portable_ser, object_data_input& input, @@ -439,14 +450,16 @@ ClassDefinition::ClassDefinition() , class_id_(0) , version_(-1) , binary_(new std::vector) -{} +{ +} ClassDefinition::ClassDefinition(int factory_id, int class_id, int version) : factory_id_(factory_id) , class_id_(class_id) , version_(version) , binary_(new std::vector) -{} +{ +} void ClassDefinition::add_field_def(FieldDefinition& fd) @@ -578,7 +591,8 @@ ClassDefinitionWriter::ClassDefinitionWriter(PortableContext& portable_context, , empty_data_output_( portable_context.get_serialization_config().get_byte_order(), true) -{} +{ +} std::shared_ptr ClassDefinitionWriter::register_and_get() @@ -595,7 +609,8 @@ ClassDefinitionWriter::get_raw_data_output() void ClassDefinitionWriter::end() -{} +{ +} data_output::data_output(boost::endian::order byte_order, bool dont_write) : byte_order_(byte_order) @@ -735,8 +750,9 @@ data_output::write(boost::uuids::uuid v) boost::endian::endian_reverse_inplace( *reinterpret_cast(&v.data[util::Bits::LONG_SIZE_IN_BYTES])); } - output_stream_.insert( - output_stream_.end(), &v.data[0], &v.data[util::Bits::UUID_SIZE_IN_BYTES]); + output_stream_.insert(output_stream_.end(), + &v.data[0], + &v.data[util::Bits::UUID_SIZE_IN_BYTES]); } template<> @@ -821,7 +837,8 @@ object_type::object_type() : type_id(serialization_constants::CONSTANT_TYPE_NULL) , factory_id(-1) , class_id(-1) -{} +{ +} std::ostream& operator<<(std::ostream& os, const object_type& type) @@ -839,7 +856,8 @@ DataSerializer::read_int(object_data_input& in) const PortableContext::PortableContext(const serialization_config& serialization_conf) : serialization_config_(serialization_conf) -{} +{ +} int PortableContext::get_class_version(int factory_id, int class_id) @@ -977,7 +995,8 @@ SerializationService::SerializationService( , portable_context_(serialization_config_) , portable_serializer_(portable_context_) , compact_serializer_(schema_service) -{} +{ +} DefaultPortableWriter::DefaultPortableWriter( PortableSerializer& portable_ser, @@ -1132,7 +1151,8 @@ SerializationService::get_object_type(const data* data) void SerializationService::dispose() -{} +{ +} PortableSerializer& SerializationService::get_portable_serializer() @@ -1186,7 +1206,8 @@ unsigned int data::DATA_OVERHEAD = data::DATA_OFFSET; data::data() : cached_hash_value_(-1) -{} +{ +} data::data(std::vector buffer, schemas_t s) : data_(std::move(buffer)) @@ -1298,7 +1319,8 @@ ClassDefinitionContext::ClassDefinitionContext( PortableContext* portable_context) : factory_id_(factory_id) , portable_context_(portable_context) -{} +{ +} int ClassDefinitionContext::get_class_version(int class_id) @@ -1373,7 +1395,8 @@ DefaultPortableReader::DefaultPortableReader( object_data_input& input, std::shared_ptr cd) : PortableReaderBase(portable_ser, input, cd) -{} +{ +} PortableReaderBase::PortableReaderBase(PortableSerializer& portable_ser, object_data_input& input, @@ -1491,11 +1514,13 @@ MorphingPortableReader::MorphingPortableReader( object_data_input& input, std::shared_ptr cd) : PortableReaderBase(portable_ser, input, cd) -{} +{ +} PortableSerializer::PortableSerializer(PortableContext& portable_context) : context_(portable_context) -{} +{ +} portable_reader PortableSerializer::create_reader(object_data_input& input, diff --git a/hazelcast/src/hazelcast/client/spi.cpp b/hazelcast/src/hazelcast/client/spi.cpp index 05a6de91d6..2e5c70d7ec 100644 --- a/hazelcast/src/hazelcast/client/spi.cpp +++ b/hazelcast/src/hazelcast/client/spi.cpp @@ -75,11 +75,13 @@ initial_membership_event::initial_membership_event( std::unordered_set members) : cluster_(cluster) , members_(std::move(members)) -{} +{ +} lifecycle_event::lifecycle_event(lifecycle_state state) : state_(state) -{} +{ +} lifecycle_event::lifecycle_state lifecycle_event::get_state() const @@ -90,11 +92,13 @@ lifecycle_event::get_state() const namespace spi { ProxyManager::ProxyManager(ClientContext& context) : client_(context) -{} +{ +} void ProxyManager::init() -{} +{ +} void ProxyManager::destroy() @@ -181,12 +185,14 @@ ProxyManager::destroy_proxy(ClientProxy& proxy) ClientContext::ClientContext(const client::hazelcast_client& hazelcast_client) : hazelcast_client_(*hazelcast_client.client_impl_) -{} +{ +} ClientContext::ClientContext( client::impl::hazelcast_client_instance_impl& hazelcast_client) : hazelcast_client_(hazelcast_client) -{} +{ +} serialization::pimpl::SerializationService& ClientContext::get_serialization_service() @@ -546,7 +552,8 @@ DefaultObjectNamespace::DefaultObjectNamespace(const std::string& service, const std::string& object) : service_name_(service) , object_name_(object) -{} +{ +} const std::string& DefaultObjectNamespace::get_service_name() const @@ -573,7 +580,8 @@ ClientProxy::ClientProxy(const std::string& name, : name_(name) , service_name_(service_name) , context_(context) -{} +{ +} ClientProxy::~ClientProxy() = default; @@ -597,7 +605,8 @@ ClientProxy::get_context() void ClientProxy::on_destroy() -{} +{ +} boost::future ClientProxy::destroy() @@ -627,15 +636,18 @@ ClientProxy::pre_destroy() void ClientProxy::post_destroy() -{} +{ +} void ClientProxy::on_initialize() -{} +{ +} void ClientProxy::on_shutdown() -{} +{ +} serialization::pimpl::SerializationService& ClientProxy::get_serialization_service() @@ -706,11 +718,13 @@ ClientInvocationServiceImpl::ClientInvocationServiceImpl(ClientContext& client) , backup_timeout_( std::chrono::milliseconds(client.get_client_properties().get_integer( client.get_client_properties().backup_timeout_millis()))) -{} +{ +} void ClientInvocationServiceImpl::start() -{} +{ +} void ClientInvocationServiceImpl::add_backup_listener() @@ -718,8 +732,9 @@ ClientInvocationServiceImpl::add_backup_listener() if (this->backup_acks_enabled_) { auto& listener_service = this->client_.get_client_listener_service(); listener_service - .register_listener(std::make_shared(), - std::make_shared(logger_)) + .register_listener( + std::make_shared(), + std::make_shared(logger_)) .get(); } } @@ -860,7 +875,8 @@ ClientInvocationServiceImpl::invoke( DefaultAddressProvider::DefaultAddressProvider( config::client_network_config& network_config) : network_config_(network_config) -{} +{ +} std::vector
DefaultAddressProvider::load_addresses() @@ -903,7 +919,8 @@ ClientClusterServiceImpl::ClientClusterServiceImpl( , member_list_snapshot_(EMPTY_SNAPSHOT) , labels_(client.get_client_config().get_labels()) , initial_list_fetched_latch_(1) -{} +{ +} boost::uuids::uuid ClientClusterServiceImpl::add_membership_listener_without_init( @@ -2123,7 +2140,8 @@ impl::ClientTransactionManagerServiceImpl::get_client() const ClientTransactionManagerServiceImpl::ClientTransactionManagerServiceImpl( ClientContext& client) : client_(client) -{} +{ +} std::shared_ptr ClientTransactionManagerServiceImpl::connect() @@ -2236,7 +2254,8 @@ ClientPartitionServiceImpl::ClientPartitionServiceImpl(ClientContext& client) , partition_count_(0) , partition_table_( boost::shared_ptr(new partition_table{ 0, -1 })) -{} +{ +} void ClientPartitionServiceImpl::handle_event( @@ -2440,12 +2459,14 @@ ClientPartitionServiceImpl::PartitionImpl::PartitionImpl( : partition_id_(partition_id) , client_(client) , partition_service_(partition_service) -{} +{ +} namespace sequence { CallIdSequenceWithoutBackpressure::CallIdSequenceWithoutBackpressure() : head_(0) -{} +{ +} CallIdSequenceWithoutBackpressure::~CallIdSequenceWithoutBackpressure() = default; @@ -2605,7 +2626,8 @@ CallIdSequenceWithBackpressure::handle_no_space_left() FailFastCallIdSequence::FailFastCallIdSequence( int32_t max_concurrent_invocations) : AbstractCallIdSequence(max_concurrent_invocations) -{} +{ +} void FailFastCallIdSequence::handle_no_space_left() @@ -2976,7 +2998,8 @@ cluster_view_listener::connection_removed( cluster_view_listener::cluster_view_listener(ClientContext& client_context) : client_context_(client_context) -{} +{ +} void cluster_view_listener::try_register( @@ -3112,11 +3135,12 @@ cluster_view_listener::event_handler::handle_clusterversion( cluster_view_listener::event_handler::event_handler( int connectionId, cluster_view_listener& viewListener, - logger &logger) + logger& logger) : protocol::codec::client_addclusterviewlistener_handler(logger) , connection_id(connectionId) , view_listener(viewListener) -{} +{ +} } // namespace listener protocol::ClientMessage @@ -3152,7 +3176,8 @@ remote_address_provider::remote_address_provider( bool use_public) : refresh_address_map_(std::move(addr_map_method)) , use_public_(use_public) -{} +{ +} std::vector
remote_address_provider::load_addresses() @@ -3205,12 +3230,15 @@ cloud_discovery::cloud_discovery(config::cloud_config& config, : cloud_config_(config) , cloud_base_url_(cloud_base_url) , timeout_(timeout) -{} +{ +} #else -cloud_discovery::cloud_discovery(config::cloud_config& /* config */, - std::string /* cloud_base_url */, - std::chrono::steady_clock::duration /* timeout */) -{} +cloud_discovery::cloud_discovery( + config::cloud_config& /* config */, + std::string /* cloud_base_url */, + std::chrono::steady_clock::duration /* timeout */) +{ +} #endif // HZ_BUILD_WITH_SSL std::unordered_map diff --git a/hazelcast/src/hazelcast/client/stats.cpp b/hazelcast/src/hazelcast/client/stats.cpp index d7d0305a95..d55ee1af98 100644 --- a/hazelcast/src/hazelcast/client/stats.cpp +++ b/hazelcast/src/hazelcast/client/stats.cpp @@ -356,7 +356,8 @@ Statistics::PeriodicStatistics::add_near_cache_metric( Statistics::PeriodicStatistics::PeriodicStatistics(Statistics& statistics) : statistics_(statistics) -{} +{ +} std::string Statistics::escape_special_characters(std::string& name) @@ -398,7 +399,8 @@ LocalMapStatsImpl::LocalMapStatsImpl() = default; LocalMapStatsImpl::LocalMapStatsImpl( const std::shared_ptr& s) : near_cache_stats_(s) -{} +{ +} std::shared_ptr LocalMapStatsImpl::get_near_cache_stats() const @@ -422,7 +424,8 @@ NearCacheStatsImpl::NearCacheStatsImpl() , last_persistence_written_bytes_(0) , last_persistence_key_count_(0) , last_persistence_failure_("") -{} +{ +} int64_t NearCacheStatsImpl::get_creation_time() diff --git a/hazelcast/src/hazelcast/client/transactions.cpp b/hazelcast/src/hazelcast/client/transactions.cpp index 6873e15585..42dba69ce4 100644 --- a/hazelcast/src/hazelcast/client/transactions.cpp +++ b/hazelcast/src/hazelcast/client/transactions.cpp @@ -48,7 +48,8 @@ TransactionProxy::TransactionProxy( , connection_(connection) , thread_id_(util::get_current_thread_id()) , state_(TxnState::NO_TXN) -{} +{ +} TransactionProxy::TransactionProxy(const TransactionProxy& rhs) : options_(rhs.options_) @@ -252,7 +253,8 @@ TxnState::TxnState(state value) values[8] = ROLLED_BACK; } -TxnState::operator int() const +TxnState:: +operator int() const { return value; } @@ -328,7 +330,8 @@ TransactionalMapImpl::TransactionalMapImpl( const std::string& name, txn::TransactionProxy& transaction_proxy) : TransactionalObject(imap::SERVICE_NAME, name, transaction_proxy) -{} +{ +} boost::future TransactionalMapImpl::contains_key_data(const serialization::pimpl::data& key) @@ -529,7 +532,8 @@ TransactionalMultiMapImpl::TransactionalMultiMapImpl( const std::string& name, txn::TransactionProxy& transaction_proxy) : TransactionalObject(multi_map::SERVICE_NAME, name, transaction_proxy) -{} +{ +} boost::future TransactionalMultiMapImpl::put_data(const serialization::pimpl::data& key, @@ -600,7 +604,8 @@ TransactionalMultiMapImpl::size() TransactionalListImpl::TransactionalListImpl(const std::string& object_name, txn::TransactionProxy& context) : TransactionalObject(ilist::SERVICE_NAME, object_name, context) -{} +{ +} boost::future TransactionalListImpl::add(const serialization::pimpl::data& e) @@ -633,7 +638,8 @@ TransactionalSetImpl::TransactionalSetImpl( const std::string& name, txn::TransactionProxy& transaction_proxy) : TransactionalObject(iset::SERVICE_NAME, name, transaction_proxy) -{} +{ +} boost::future TransactionalSetImpl::add_data(const serialization::pimpl::data& e) @@ -669,7 +675,8 @@ TransactionalObject::TransactionalObject(const std::string& service_name, , service_name_(service_name) , name_(object_name) , context_(context) -{} +{ +} TransactionalObject::~TransactionalObject() = default; @@ -697,7 +704,8 @@ TransactionalObject::destroy() void TransactionalObject::on_destroy() -{} +{ +} boost::uuids::uuid TransactionalObject::get_transaction_id() const @@ -718,7 +726,8 @@ transaction_context::transaction_context( : options_(txn_options) , txn_connection_(transaction_manager.connect()) , transaction_(options_, transaction_manager.get_client(), txn_connection_) -{} +{ +} boost::uuids::uuid transaction_context::get_txn_id() const @@ -748,7 +757,8 @@ transaction_options::transaction_options() : timeout_(std::chrono::minutes(2)) , durability_(1) , transaction_type_(transaction_type::TWO_PHASE) -{} +{ +} transaction_options::transaction_type transaction_options::get_transaction_type() const diff --git a/hazelcast/src/hazelcast/cp/cp.cpp b/hazelcast/src/hazelcast/cp/cp.cpp index 798107f334..c6754798b9 100644 --- a/hazelcast/src/hazelcast/cp/cp.cpp +++ b/hazelcast/src/hazelcast/cp/cp.cpp @@ -33,7 +33,8 @@ using namespace hazelcast::util; raft_proxy_factory::raft_proxy_factory(client::spi::ClientContext& context) : context_(context) -{} +{ +} std::shared_ptr raft_proxy_factory::create_fenced_lock(raft_group_id&& group_id, @@ -152,7 +153,8 @@ raft_proxy_factory::get_group_id(const std::string& proxy_name, cp_subsystem::cp_subsystem(client::spi::ClientContext& context) : context_(context) , proxy_factory_(context) -{} +{ +} boost::future> cp_subsystem::get_atomic_long(const std::string& name) @@ -192,7 +194,8 @@ cp_proxy::cp_proxy(const std::string& service_name, : ProxyImpl(service_name, proxy_name, context) , group_id_(group_id) , object_name_(object_name) -{} +{ +} void cp_proxy::on_destroy() @@ -213,7 +216,8 @@ atomic_long::atomic_long(const std::string& name, const raft_group_id& group_id, const std::string& object_name) : cp_proxy(SERVICE_NAME, name, &context, group_id, object_name) -{} +{ +} boost::future atomic_long::add_and_get(int64_t delta) @@ -307,7 +311,8 @@ atomic_reference::atomic_reference(const std::string& name, const raft_group_id& group_id, const std::string& object_name) : cp_proxy(SERVICE_NAME, name, &context, group_id, object_name) -{} +{ +} boost::future> atomic_reference::get_data() @@ -417,7 +422,8 @@ latch::latch(const std::string& name, const raft_group_id& group_id, const std::string& object_name) : cp_proxy(SERVICE_NAME, name, &context, group_id, object_name) -{} +{ +} boost::future latch::try_set_count(int32_t count) @@ -521,7 +527,8 @@ fenced_lock::fenced_lock(const std::string& name, group_id, object_name, context.get_proxy_session_manager()) -{} +{ +} boost::future fenced_lock::lock() @@ -934,7 +941,8 @@ session_aware_proxy::session_aware_proxy( internal::session::proxy_session_manager& session_manager) : cp_proxy(service_name, proxy_name, context, group_id, object_name) , session_manager_(session_manager) -{} +{ +} void session_aware_proxy::release_session(int64_t session_id) @@ -966,7 +974,8 @@ counting_semaphore::counting_semaphore( group_id, object_name, session_manager) -{} +{ +} boost::future counting_semaphore::init(int32_t permits) @@ -1058,7 +1067,8 @@ sessionless_semaphore::sessionless_semaphore( group_id, object_name, session_manager) -{} +{ +} boost::future sessionless_semaphore::acquire(int32_t permits) @@ -1180,7 +1190,8 @@ session_semaphore::session_semaphore( group_id, object_name, session_manager) -{} +{ +} boost::future session_semaphore::acquire(int32_t permits) diff --git a/hazelcast/src/hazelcast/cp/cp_impl.cpp b/hazelcast/src/hazelcast/cp/cp_impl.cpp index 3a8319dd3e..2ee0f76c4e 100644 --- a/hazelcast/src/hazelcast/cp/cp_impl.cpp +++ b/hazelcast/src/hazelcast/cp/cp_impl.cpp @@ -35,7 +35,8 @@ constexpr int64_t proxy_session_manager::SHUTDOWN_TIMEOUT_SECONDS; proxy_session_manager::proxy_session_manager( hazelcast::client::spi::ClientContext& client) : client_(client) -{} +{ +} int64_t proxy_session_manager::acquire_session(const raft_group_id& group_id) @@ -80,11 +81,11 @@ proxy_session_manager::create_new_session(const raft_group_id& group_id) { // the lock_ is already acquired as write lock auto response = request_new_session(group_id); - session_state state { response.id , response.ttl_millis }; + session_state state{ response.id, response.ttl_millis }; - auto result = sessions_.emplace( group_id, state ); + auto result = sessions_.emplace(group_id, state); - if(!result.second) + if (!result.second) result.first->second = state; schedule_heartbeat_task(response.heartbeat_millis); @@ -318,24 +319,26 @@ proxy_session_manager::session_state::session_state(int64_t id, : id(id) , ttl(ttl_millis) , creation_time(std::chrono::steady_clock::now()) -{} +{ +} proxy_session_manager::session_state::session_state(const session_state& rhs) : id(rhs.id) , ttl(rhs.ttl) , creation_time(rhs.creation_time) , acquire_count(rhs.acquire_count.load()) -{} +{ +} proxy_session_manager::session_state& proxy_session_manager::session_state::operator=(const session_state& rhs) { - id = rhs.id; - ttl = rhs.ttl; - creation_time = rhs.creation_time; - acquire_count = rhs.acquire_count.load(); + id = rhs.id; + ttl = rhs.ttl; + creation_time = rhs.creation_time; + acquire_count = rhs.acquire_count.load(); - return *this; + return *this; } int64_t diff --git a/hazelcast/src/hazelcast/logger.cpp b/hazelcast/src/hazelcast/logger.cpp index 76d410d889..68972d4667 100644 --- a/hazelcast/src/hazelcast/logger.cpp +++ b/hazelcast/src/hazelcast/logger.cpp @@ -63,7 +63,8 @@ logger::logger(std::string instance_name, , cluster_name_{ std::move(cluster_name) } , level_{ level } , handler_{ std::move(handler) } -{} +{ +} bool logger::enabled(level lvl) noexcept diff --git a/hazelcast/src/hazelcast/util/util.cpp b/hazelcast/src/hazelcast/util/util.cpp index d0a2f040bc..07944fc297 100644 --- a/hazelcast/src/hazelcast/util/util.cpp +++ b/hazelcast/src/hazelcast/util/util.cpp @@ -543,7 +543,8 @@ SyncHttpClient::SyncHttpClient(const std::string& server_ip, , uri_path_(uri_path) , socket_(io_service_) , response_stream_(&response_) -{} +{ +} std::istream& SyncHttpClient::open_connection() @@ -856,7 +857,8 @@ AddressHolder::AddressHolder(const std::string& address, : address_(address) , scope_id_(scope_id) , port_(port) -{} +{ +} std::ostream& operator<<(std::ostream& os, const AddressHolder& holder) @@ -1126,7 +1128,8 @@ ByteBuffer::ByteBuffer(char* buffer, size_t capacity) , lim_(capacity) , capacity_(capacity) , buffer_(buffer) -{} +{ +} ByteBuffer& ByteBuffer::flip() @@ -1236,11 +1239,13 @@ ByteBuffer::safe_increment_position(size_t t) hz_thread_pool::hz_thread_pool() : pool_(new boost::asio::thread_pool()) -{} +{ +} hz_thread_pool::hz_thread_pool(size_t num_threads) : pool_(new boost::asio::thread_pool(num_threads)) -{} +{ +} void hz_thread_pool::close() diff --git a/hazelcast/test/src/ClientTest.cpp b/hazelcast/test/src/ClientTest.cpp index 5506584869..267b9f38a4 100644 --- a/hazelcast/test/src/ClientTest.cpp +++ b/hazelcast/test/src/ClientTest.cpp @@ -122,8 +122,8 @@ ClientTest::generate_key_owned_by(spi::ClientContext& context, partitionService.get_partition(partitionId); auto owner = partition->get_owner(); if (!owner) { - // give some time for the partition table to be populated - std::this_thread::sleep_for(std::chrono::milliseconds(100)); + // give some time for the partition table to be populated + std::this_thread::sleep_for(std::chrono::milliseconds(100)); } if (owner && *owner == member) { diff --git a/hazelcast/test/src/HazelcastTests1.cpp b/hazelcast/test/src/HazelcastTests1.cpp index 261e6c5e0b..7cbd146063 100644 --- a/hazelcast/test/src/HazelcastTests1.cpp +++ b/hazelcast/test/src/HazelcastTests1.cpp @@ -543,7 +543,8 @@ namespace test { namespace rb { StartsWithStringFilter::StartsWithStringFilter(const std::string& start_string) : start_string_(start_string) -{} +{ +} } // namespace rb } // namespace test @@ -1359,7 +1360,8 @@ class ClusterTest public: ClusterTest() : ssl_factory_(get_ssl_file_path()) - {} + { + } protected: lifecycle_listener make_all_states_listener(boost::latch& starting, @@ -2461,7 +2463,8 @@ class ClientTxnMapTest : public ClientTest ClientTxnMapTest::ClientTxnMapTest() : instance_(default_server_factory()) , client_(get_new_client()) -{} +{ +} ClientTxnMapTest::~ClientTxnMapTest() { @@ -2887,7 +2890,8 @@ class ClientTxnSetTest : public ClientTest ClientTxnSetTest::ClientTxnSetTest() : instance_(default_server_factory()) , client_(get_new_client()) -{} +{ +} ClientTxnSetTest::~ClientTxnSetTest() { @@ -3231,7 +3235,8 @@ class ClientTxnListTest : public ClientTest ClientTxnListTest::ClientTxnListTest() : instance_(default_server_factory()) , client_(get_new_client()) -{} +{ +} ClientTxnListTest::~ClientTxnListTest() { @@ -3290,7 +3295,8 @@ class ClientTxnMultiMapTest : public ClientTest ClientTxnMultiMapTest::ClientTxnMultiMapTest() : instance_(default_server_factory()) , client_(get_new_client()) -{} +{ +} ClientTxnMultiMapTest::~ClientTxnMultiMapTest() { @@ -3397,7 +3403,8 @@ class ClientTxnQueueTest : public ClientTest ClientTxnQueueTest::ClientTxnQueueTest() : instance_(default_server_factory()) , client_(get_new_client()) -{} +{ +} ClientTxnQueueTest::~ClientTxnQueueTest() { diff --git a/hazelcast/test/src/HazelcastTests2.cpp b/hazelcast/test/src/HazelcastTests2.cpp index dbfc09376b..186232bb2f 100644 --- a/hazelcast/test/src/HazelcastTests2.cpp +++ b/hazelcast/test/src/HazelcastTests2.cpp @@ -903,7 +903,8 @@ class PortableVersionTest : public serialization_test_base Child(std::string name) : name_(name) - {} + { + } const std::string& get_name() const { return name_; } @@ -928,7 +929,8 @@ class PortableVersionTest : public serialization_test_base Parent(Child child) : child_(child) - {} + { + } const Child& get_child() const { return child_; } @@ -1026,7 +1028,8 @@ class PartitionAwareTest : public serialization_test_base public: SimplePartitionAwareObject() : test_key_(5) - {} + { + } const int* get_partition_key() const override { return &test_key_; } @@ -1079,7 +1082,8 @@ struct hz_serializer static void write_data( const test::PartitionAwareTest::SimplePartitionAwareObject& object, object_data_output& out) - {} + { + } static test::PartitionAwareTest::SimplePartitionAwareObject read_data( object_data_input& in) @@ -1099,7 +1103,8 @@ class JsonValueSerializationTest : public serialization_test_base public: JsonValueSerializationTest() : serialization_service_(config_, get_schema_service()) - {} + { + } protected: serialization::pimpl::SerializationService serialization_service_; diff --git a/hazelcast/test/src/HazelcastTests3.cpp b/hazelcast/test/src/HazelcastTests3.cpp index 425c8c011a..74a714e7a6 100644 --- a/hazelcast/test/src/HazelcastTests3.cpp +++ b/hazelcast/test/src/HazelcastTests3.cpp @@ -1684,7 +1684,8 @@ ClientTopicTest::ClientTopicTest() : instance_(default_server_factory()) , client_(get_new_client()) , topic_(client_.get_topic("ClientTopicTest").get()) -{} +{ +} TEST_F(ClientTopicTest, testTopicListeners) { diff --git a/hazelcast/test/src/HazelcastTests5.cpp b/hazelcast/test/src/HazelcastTests5.cpp index cf6f9c6859..b9857fd4bb 100644 --- a/hazelcast/test/src/HazelcastTests5.cpp +++ b/hazelcast/test/src/HazelcastTests5.cpp @@ -141,7 +141,8 @@ class CallIdSequenceWithBackpressureTest : public ::testing::Test boost::latch& next_called_latch) : sequence_(sequence) , next_called_latch_(next_called_latch) - {} + { + } virtual const std::string get_name() const { @@ -400,7 +401,8 @@ class MapGlobalSerializerTest : public ClientTest public: UnknownObject(int value) : value_(value) - {} + { + } int get_value() const { return value_; } @@ -718,12 +720,14 @@ class PartitionAwareInt : public partition_aware PartitionAwareInt() : partition_key_(0) , actual_key_(0) - {} + { + } PartitionAwareInt(int partition_key, int actual_key) : partition_key_(partition_key) , actual_key_(actual_key) - {} + { + } const int* get_partition_key() const override { return &partition_key_; } @@ -787,7 +791,8 @@ class ClientMapTest , imap_(client_.get_map(imapName).get()) , int_map_(client_.get_map(intMapName).get()) , employees_(client_.get_map(employeesMapName).get()) - {} + { + } ~ClientMapTest() { client_.shutdown().get(); } @@ -813,7 +818,8 @@ class ClientMapTest public: MapGetInterceptor(const std::string& prefix) : prefix_(prefix) - {} + { + } private: std::string prefix_; @@ -824,7 +830,8 @@ class ClientMapTest public: EntryMultiplier(int multiplier) : multiplier_(multiplier) - {} + { + } int get_multiplier() const { return multiplier_; } diff --git a/hazelcast/test/src/HazelcastTests7.cpp b/hazelcast/test/src/HazelcastTests7.cpp index 846c6d8b58..d08eb65fc1 100644 --- a/hazelcast/test/src/HazelcastTests7.cpp +++ b/hazelcast/test/src/HazelcastTests7.cpp @@ -1605,7 +1605,8 @@ TEST_P(AwsClientTest, DISABLED_testClientAwsMemberNonDefaultPortConfig) hazelcastClient.shutdown().get(); } -TEST_P(AwsClientTest, DISABLED_testClientAwsMemberWithSecurityGroupDefaultIamRole) +TEST_P(AwsClientTest, + DISABLED_testClientAwsMemberWithSecurityGroupDefaultIamRole) { if (GetParam() && !std::getenv("INSIDE_AWS")) { GTEST_SKIP(); @@ -1640,7 +1641,7 @@ TEST_P(AwsClientTest, DISABLED_testFipsEnabledAwsDiscovery) { #if OPENSSL_VERSION_NUMBER >= 0x30000000L GTEST_SKIP(); -#else +#else if (GetParam() && !std::getenv("INSIDE_AWS")) { GTEST_SKIP(); } @@ -1661,8 +1662,8 @@ TEST_P(AwsClientTest, DISABLED_testFipsEnabledAwsDiscovery) GetParam()); #if OPENSSL_VERSION_NUMBER >= 0x30000000L - // FIPS mode can be enabled over SSL conf - //https://wiki.openssl.org/index.php/OpenSSL_3.0 + // FIPS mode can be enabled over SSL conf + // https://wiki.openssl.org/index.php/OpenSSL_3.0 #else // Turn Fips mode on FIPS_mode_set(1); @@ -1699,8 +1700,9 @@ TEST_F(AwsClientTest, DISABLED_testRetrieveCredentialsFromIamRoleAndConnect) hazelcastClient.shutdown().get(); } -TEST_F(AwsClientTest, - DISABLED_testRetrieveCredentialsFromInstanceProfileDefaultIamRoleAndConnect) +TEST_F( + AwsClientTest, + DISABLED_testRetrieveCredentialsFromInstanceProfileDefaultIamRoleAndConnect) { // This test can only run inside the AWS network if (!std::getenv("INSIDE_AWS")) { @@ -1754,7 +1756,8 @@ TEST_F(DescribeInstancesTest, DISABLED_testDescribeInstancesTagAndValueSet) results.find(getenv("HZ_TEST_AWS_INSTANCE_PRIVATE_IP"))); } -TEST_F(DescribeInstancesTest, DISABLED_testDescribeInstancesTagAndNonExistentValueSet) +TEST_F(DescribeInstancesTest, + DISABLED_testDescribeInstancesTagAndNonExistentValueSet) { client::config::client_aws_config awsConfig; awsConfig.set_enabled(true) @@ -1789,7 +1792,8 @@ TEST_F(DescribeInstancesTest, DISABLED_testDescribeInstancesOnlyTagIsSet) results.find(getenv("HZ_TEST_AWS_INSTANCE_PRIVATE_IP"))); } -TEST_F(DescribeInstancesTest, DISABLED_testDescribeInstancesOnlyTagIsSetToNonExistentTag) +TEST_F(DescribeInstancesTest, + DISABLED_testDescribeInstancesOnlyTagIsSetToNonExistentTag) { client::config::client_aws_config awsConfig; awsConfig.set_enabled(true) @@ -1858,7 +1862,8 @@ TEST_F(DescribeInstancesTest, DISABLED_testDescribeInstancesSecurityGroup) results.find(getenv("HZ_TEST_AWS_INSTANCE_PRIVATE_IP"))); } -TEST_F(DescribeInstancesTest, DISABLED_testDescribeInstancesNonExistentSecurityGroup) +TEST_F(DescribeInstancesTest, + DISABLED_testDescribeInstancesNonExistentSecurityGroup) { client::config::client_aws_config awsConfig; awsConfig.set_enabled(true) diff --git a/hazelcast/test/src/HazelcastTests8.cpp b/hazelcast/test/src/HazelcastTests8.cpp index 67b0c71600..aa8b58434b 100644 --- a/hazelcast/test/src/HazelcastTests8.cpp +++ b/hazelcast/test/src/HazelcastTests8.cpp @@ -1144,7 +1144,8 @@ class ReliableTopicTest : public ClientTest , latch_for_termination(latch_count) , latch_for_cancel(latch_count) , start_sequence(start_sequence) - {} + { + } boost::latch latch1; boost::latch latch_for_seq_id; @@ -1180,8 +1181,7 @@ class ReliableTopicTest : public ClientTest return true; }; - auto cancel_handler = - [state]() -> bool { + auto cancel_handler = [state]() -> bool { state->latch_for_cancel.count_down(); return true; }; @@ -1622,13 +1622,15 @@ class SimpleMapTest : public ClientTest : get_count(0) , put_count(0) , remove_count(0) - {} + { + } Stats(const Stats& rhs) : get_count(const_cast(rhs).get_count.load()) , put_count(const_cast(rhs).put_count.load()) , remove_count(const_cast(rhs).remove_count.load()) - {} + { + } Stats get_and_reset() { @@ -1661,7 +1663,8 @@ class SimpleMapTest : public ClientTest public: explicit StatsPrinterTask(Stats& stats) : stats_(stats) - {} + { + } void run() { @@ -1693,7 +1696,8 @@ class SimpleMapTest : public ClientTest : stats_(stats) , map_(map) , logger_(std::move(lg)) - {} + { + } void run() { @@ -2096,7 +2100,8 @@ TEST_F( hz.shutdown().get(); } -TEST_F(IssueTest,TestIssue1005){ +TEST_F(IssueTest, TestIssue1005) +{ HazelcastServerFactory fac("hazelcast/test/resources/lock-expiration.xml"); HazelcastServer serv1(fac); HazelcastServer serv2(fac); @@ -2114,7 +2119,8 @@ TEST_F(IssueTest,TestIssue1005){ c.shutdown().get(); } -TEST_F(IssueTest, TestIssue1196){ +TEST_F(IssueTest, TestIssue1196) +{ client_config conf; hazelcast::client::config::near_cache_config n1; hazelcast::client::config::near_cache_config n2; @@ -2127,7 +2133,8 @@ TEST_F(IssueTest, TestIssue1196){ conf.add_near_cache_config(n2); ASSERT_NE(conf.get_near_cache_config("pattern"), nullptr); - EXPECT_EQ(conf.get_near_cache_config("pattern")->get_max_idle_seconds(), 11); + EXPECT_EQ(conf.get_near_cache_config("pattern")->get_max_idle_seconds(), + 11); } } // namespace test } // namespace client @@ -2360,11 +2367,11 @@ TEST(ClientMessageTest, test_encode_sql_query_id) protocol::ClientMessage msg; boost::uuids::uuid server_uuid = boost::uuids::uuid{ - { 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16 }}; + { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } + }; boost::uuids::uuid client_uuid = boost::uuids::uuid{ - { 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36 }}; + { 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 } + }; msg.set(sql::impl::query_id{ server_uuid, client_uuid }); @@ -2420,13 +2427,13 @@ TEST(ClientMessageTest, test_decode_sql_page) msg.wrap_for_read(); std::vector columns_metadata{ - {"foo", sql::sql_column_type::varchar, true}, - {"test", sql::sql_column_type::varchar, true}, + { "foo", sql::sql_column_type::varchar, true }, + { "test", sql::sql_column_type::varchar, true }, }; auto row_metadata = std::make_shared(std::move(columns_metadata)); - auto page = protocol::codec::builtin::sql_page_codec::decode(msg, - row_metadata); + auto page = + protocol::codec::builtin::sql_page_codec::decode(msg, row_metadata); EXPECT_EQ(true, page->last()); EXPECT_EQ((std::vector{ @@ -2662,7 +2669,7 @@ TEST_F(ClientStateOutput, test_output) { using client_state = connection::ClientConnectionManagerImpl::client_state; - auto to_string = [](client_state st){ + auto to_string = [](client_state st) { std::stringstream ss; ss << st; @@ -2670,10 +2677,13 @@ TEST_F(ClientStateOutput, test_output) return ss.str(); }; - EXPECT_EQ(to_string(client_state::CONNECTED_TO_CLUSTER), "CONNECTED_TO_CLUSTER"); - EXPECT_EQ(to_string(client_state::DISCONNECTED_FROM_CLUSTER), "DISCONNECTED_FROM_CLUSTER"); + EXPECT_EQ(to_string(client_state::CONNECTED_TO_CLUSTER), + "CONNECTED_TO_CLUSTER"); + EXPECT_EQ(to_string(client_state::DISCONNECTED_FROM_CLUSTER), + "DISCONNECTED_FROM_CLUSTER"); EXPECT_EQ(to_string(client_state::INITIAL), "INITIAL"); - EXPECT_EQ(to_string(client_state::INITIALIZED_ON_CLUSTER), "INITIALIZED_ON_CLUSTER"); + EXPECT_EQ(to_string(client_state::INITIALIZED_ON_CLUSTER), + "INITIALIZED_ON_CLUSTER"); } } // namespace test } // namespace client @@ -2754,7 +2764,7 @@ TEST_P(ThreadPoolTest, testEqualThreadAndJobs) }); } ASSERT_OPEN_EVENTUALLY(state->latch1); - ASSERT_EQ( expected_thread_num, state->thread_ids.size()); + ASSERT_EQ(expected_thread_num, state->thread_ids.size()); } INSTANTIATE_TEST_SUITE_P(ThreadPoolTestSuite, diff --git a/hazelcast/test/src/compact/compact_read_write_integration_test.h b/hazelcast/test/src/compact/compact_read_write_integration_test.h index 980e2bb96d..8be2e7138c 100644 --- a/hazelcast/test/src/compact/compact_read_write_integration_test.h +++ b/hazelcast/test/src/compact/compact_read_write_integration_test.h @@ -55,7 +55,8 @@ TEST_F(CompactReadWriteIntegrationTest, write_read_sql) sample_compact_type value{ 100 }; auto map_name = random_string(); auto key = random_string(); - auto type_name = serialization::hz_serializer::type_name(); + auto type_name = + serialization::hz_serializer::type_name(); auto map = client->get_map(map_name).get(); diff --git a/hazelcast/test/src/compact/compact_schema_fetch_on_read.h b/hazelcast/test/src/compact/compact_schema_fetch_on_read.h index e6fd02f2d2..a0ec237aa4 100644 --- a/hazelcast/test/src/compact/compact_schema_fetch_on_read.h +++ b/hazelcast/test/src/compact/compact_schema_fetch_on_read.h @@ -151,7 +151,8 @@ TEST_F(CompactSchemaFetchOnRead, sql_read) "'valueFormat' = 'compact', " "'valueCompactTypeName' = '%2%' " ")") % - map_name_ % serialization::hz_serializer::type_name()) + map_name_ % + serialization::hz_serializer::type_name()) .str(); (void)client->get_sql().execute(query).get(); diff --git a/hazelcast/test/src/compact/serialization/sample_compact_type.h b/hazelcast/test/src/compact/serialization/sample_compact_type.h index e66edc6ff8..c617b965bf 100644 --- a/hazelcast/test/src/compact/serialization/sample_compact_type.h +++ b/hazelcast/test/src/compact/serialization/sample_compact_type.h @@ -36,7 +36,8 @@ struct sample_compact_type namespace serialization { template<> -struct hz_serializer : compact::compact_serializer +struct hz_serializer + : compact::compact_serializer { static void write(const test::compact::sample_compact_type& object, compact::compact_writer& writer) @@ -46,7 +47,8 @@ struct hz_serializer : compact::compact_seri object.nested); } - static test::compact::sample_compact_type read(compact::compact_reader& reader) + static test::compact::sample_compact_type read( + compact::compact_reader& reader) { test::compact::sample_compact_type object; diff --git a/hazelcast/test/src/cpp-controller/RemoteController.cpp b/hazelcast/test/src/cpp-controller/RemoteController.cpp index 38ca1e09b0..1250807383 100644 --- a/hazelcast/test/src/cpp-controller/RemoteController.cpp +++ b/hazelcast/test/src/cpp-controller/RemoteController.cpp @@ -503,7 +503,8 @@ RemoteController_exit_presult::read( RemoteController_createCluster_args:: ~RemoteController_createCluster_args() noexcept -{} +{ +} uint32_t RemoteController_createCluster_args::read( @@ -579,7 +580,8 @@ RemoteController_createCluster_args::write( RemoteController_createCluster_pargs:: ~RemoteController_createCluster_pargs() noexcept -{} +{ +} uint32_t RemoteController_createCluster_pargs::write( @@ -606,7 +608,8 @@ RemoteController_createCluster_pargs::write( RemoteController_createCluster_result:: ~RemoteController_createCluster_result() noexcept -{} +{ +} uint32_t RemoteController_createCluster_result::read( @@ -684,7 +687,8 @@ RemoteController_createCluster_result::write( RemoteController_createCluster_presult:: ~RemoteController_createCluster_presult() noexcept -{} +{ +} uint32_t RemoteController_createCluster_presult::read( @@ -737,7 +741,8 @@ RemoteController_createCluster_presult::read( RemoteController_createClusterKeepClusterName_args:: ~RemoteController_createClusterKeepClusterName_args() noexcept -{} +{ +} uint32_t RemoteController_createClusterKeepClusterName_args::read( @@ -814,7 +819,8 @@ RemoteController_createClusterKeepClusterName_args::write( RemoteController_createClusterKeepClusterName_pargs:: ~RemoteController_createClusterKeepClusterName_pargs() noexcept -{} +{ +} uint32_t RemoteController_createClusterKeepClusterName_pargs::write( @@ -842,7 +848,8 @@ RemoteController_createClusterKeepClusterName_pargs::write( RemoteController_createClusterKeepClusterName_result:: ~RemoteController_createClusterKeepClusterName_result() noexcept -{} +{ +} uint32_t RemoteController_createClusterKeepClusterName_result::read( @@ -921,7 +928,8 @@ RemoteController_createClusterKeepClusterName_result::write( RemoteController_createClusterKeepClusterName_presult:: ~RemoteController_createClusterKeepClusterName_presult() noexcept -{} +{ +} uint32_t RemoteController_createClusterKeepClusterName_presult::read( @@ -973,7 +981,8 @@ RemoteController_createClusterKeepClusterName_presult::read( } RemoteController_startMember_args::~RemoteController_startMember_args() noexcept -{} +{ +} uint32_t RemoteController_startMember_args::read( @@ -1036,7 +1045,8 @@ RemoteController_startMember_args::write( RemoteController_startMember_pargs:: ~RemoteController_startMember_pargs() noexcept -{} +{ +} uint32_t RemoteController_startMember_pargs::write( @@ -1058,7 +1068,8 @@ RemoteController_startMember_pargs::write( RemoteController_startMember_result:: ~RemoteController_startMember_result() noexcept -{} +{ +} uint32_t RemoteController_startMember_result::read( @@ -1136,7 +1147,8 @@ RemoteController_startMember_result::write( RemoteController_startMember_presult:: ~RemoteController_startMember_presult() noexcept -{} +{ +} uint32_t RemoteController_startMember_presult::read( @@ -1189,7 +1201,8 @@ RemoteController_startMember_presult::read( RemoteController_shutdownMember_args:: ~RemoteController_shutdownMember_args() noexcept -{} +{ +} uint32_t RemoteController_shutdownMember_args::read( @@ -1265,7 +1278,8 @@ RemoteController_shutdownMember_args::write( RemoteController_shutdownMember_pargs:: ~RemoteController_shutdownMember_pargs() noexcept -{} +{ +} uint32_t RemoteController_shutdownMember_pargs::write( @@ -1292,7 +1306,8 @@ RemoteController_shutdownMember_pargs::write( RemoteController_shutdownMember_result:: ~RemoteController_shutdownMember_result() noexcept -{} +{ +} uint32_t RemoteController_shutdownMember_result::read( @@ -1357,7 +1372,8 @@ RemoteController_shutdownMember_result::write( RemoteController_shutdownMember_presult:: ~RemoteController_shutdownMember_presult() noexcept -{} +{ +} uint32_t RemoteController_shutdownMember_presult::read( @@ -1402,7 +1418,8 @@ RemoteController_shutdownMember_presult::read( RemoteController_terminateMember_args:: ~RemoteController_terminateMember_args() noexcept -{} +{ +} uint32_t RemoteController_terminateMember_args::read( @@ -1478,7 +1495,8 @@ RemoteController_terminateMember_args::write( RemoteController_terminateMember_pargs:: ~RemoteController_terminateMember_pargs() noexcept -{} +{ +} uint32_t RemoteController_terminateMember_pargs::write( @@ -1505,7 +1523,8 @@ RemoteController_terminateMember_pargs::write( RemoteController_terminateMember_result:: ~RemoteController_terminateMember_result() noexcept -{} +{ +} uint32_t RemoteController_terminateMember_result::read( @@ -1570,7 +1589,8 @@ RemoteController_terminateMember_result::write( RemoteController_terminateMember_presult:: ~RemoteController_terminateMember_presult() noexcept -{} +{ +} uint32_t RemoteController_terminateMember_presult::read( @@ -1615,7 +1635,8 @@ RemoteController_terminateMember_presult::read( RemoteController_suspendMember_args:: ~RemoteController_suspendMember_args() noexcept -{} +{ +} uint32_t RemoteController_suspendMember_args::read( @@ -1691,7 +1712,8 @@ RemoteController_suspendMember_args::write( RemoteController_suspendMember_pargs:: ~RemoteController_suspendMember_pargs() noexcept -{} +{ +} uint32_t RemoteController_suspendMember_pargs::write( @@ -1718,7 +1740,8 @@ RemoteController_suspendMember_pargs::write( RemoteController_suspendMember_result:: ~RemoteController_suspendMember_result() noexcept -{} +{ +} uint32_t RemoteController_suspendMember_result::read( @@ -1783,7 +1806,8 @@ RemoteController_suspendMember_result::write( RemoteController_suspendMember_presult:: ~RemoteController_suspendMember_presult() noexcept -{} +{ +} uint32_t RemoteController_suspendMember_presult::read( @@ -1828,7 +1852,8 @@ RemoteController_suspendMember_presult::read( RemoteController_resumeMember_args:: ~RemoteController_resumeMember_args() noexcept -{} +{ +} uint32_t RemoteController_resumeMember_args::read( @@ -1904,7 +1929,8 @@ RemoteController_resumeMember_args::write( RemoteController_resumeMember_pargs:: ~RemoteController_resumeMember_pargs() noexcept -{} +{ +} uint32_t RemoteController_resumeMember_pargs::write( @@ -1931,7 +1957,8 @@ RemoteController_resumeMember_pargs::write( RemoteController_resumeMember_result:: ~RemoteController_resumeMember_result() noexcept -{} +{ +} uint32_t RemoteController_resumeMember_result::read( @@ -1996,7 +2023,8 @@ RemoteController_resumeMember_result::write( RemoteController_resumeMember_presult:: ~RemoteController_resumeMember_presult() noexcept -{} +{ +} uint32_t RemoteController_resumeMember_presult::read( @@ -2041,7 +2069,8 @@ RemoteController_resumeMember_presult::read( RemoteController_shutdownCluster_args:: ~RemoteController_shutdownCluster_args() noexcept -{} +{ +} uint32_t RemoteController_shutdownCluster_args::read( @@ -2104,7 +2133,8 @@ RemoteController_shutdownCluster_args::write( RemoteController_shutdownCluster_pargs:: ~RemoteController_shutdownCluster_pargs() noexcept -{} +{ +} uint32_t RemoteController_shutdownCluster_pargs::write( @@ -2126,7 +2156,8 @@ RemoteController_shutdownCluster_pargs::write( RemoteController_shutdownCluster_result:: ~RemoteController_shutdownCluster_result() noexcept -{} +{ +} uint32_t RemoteController_shutdownCluster_result::read( @@ -2191,7 +2222,8 @@ RemoteController_shutdownCluster_result::write( RemoteController_shutdownCluster_presult:: ~RemoteController_shutdownCluster_presult() noexcept -{} +{ +} uint32_t RemoteController_shutdownCluster_presult::read( @@ -2236,7 +2268,8 @@ RemoteController_shutdownCluster_presult::read( RemoteController_terminateCluster_args:: ~RemoteController_terminateCluster_args() noexcept -{} +{ +} uint32_t RemoteController_terminateCluster_args::read( @@ -2299,7 +2332,8 @@ RemoteController_terminateCluster_args::write( RemoteController_terminateCluster_pargs:: ~RemoteController_terminateCluster_pargs() noexcept -{} +{ +} uint32_t RemoteController_terminateCluster_pargs::write( @@ -2321,7 +2355,8 @@ RemoteController_terminateCluster_pargs::write( RemoteController_terminateCluster_result:: ~RemoteController_terminateCluster_result() noexcept -{} +{ +} uint32_t RemoteController_terminateCluster_result::read( @@ -2386,7 +2421,8 @@ RemoteController_terminateCluster_result::write( RemoteController_terminateCluster_presult:: ~RemoteController_terminateCluster_presult() noexcept -{} +{ +} uint32_t RemoteController_terminateCluster_presult::read( @@ -2431,7 +2467,8 @@ RemoteController_terminateCluster_presult::read( RemoteController_splitMemberFromCluster_args:: ~RemoteController_splitMemberFromCluster_args() noexcept -{} +{ +} uint32_t RemoteController_splitMemberFromCluster_args::read( @@ -2495,7 +2532,8 @@ RemoteController_splitMemberFromCluster_args::write( RemoteController_splitMemberFromCluster_pargs:: ~RemoteController_splitMemberFromCluster_pargs() noexcept -{} +{ +} uint32_t RemoteController_splitMemberFromCluster_pargs::write( @@ -2518,7 +2556,8 @@ RemoteController_splitMemberFromCluster_pargs::write( RemoteController_splitMemberFromCluster_result:: ~RemoteController_splitMemberFromCluster_result() noexcept -{} +{ +} uint32_t RemoteController_splitMemberFromCluster_result::read( @@ -2584,7 +2623,8 @@ RemoteController_splitMemberFromCluster_result::write( RemoteController_splitMemberFromCluster_presult:: ~RemoteController_splitMemberFromCluster_presult() noexcept -{} +{ +} uint32_t RemoteController_splitMemberFromCluster_presult::read( @@ -2629,7 +2669,8 @@ RemoteController_splitMemberFromCluster_presult::read( RemoteController_mergeMemberToCluster_args:: ~RemoteController_mergeMemberToCluster_args() noexcept -{} +{ +} uint32_t RemoteController_mergeMemberToCluster_args::read( @@ -2706,7 +2747,8 @@ RemoteController_mergeMemberToCluster_args::write( RemoteController_mergeMemberToCluster_pargs:: ~RemoteController_mergeMemberToCluster_pargs() noexcept -{} +{ +} uint32_t RemoteController_mergeMemberToCluster_pargs::write( @@ -2734,7 +2776,8 @@ RemoteController_mergeMemberToCluster_pargs::write( RemoteController_mergeMemberToCluster_result:: ~RemoteController_mergeMemberToCluster_result() noexcept -{} +{ +} uint32_t RemoteController_mergeMemberToCluster_result::read( @@ -2800,7 +2843,8 @@ RemoteController_mergeMemberToCluster_result::write( RemoteController_mergeMemberToCluster_presult:: ~RemoteController_mergeMemberToCluster_presult() noexcept -{} +{ +} uint32_t RemoteController_mergeMemberToCluster_presult::read( @@ -2845,7 +2889,8 @@ RemoteController_mergeMemberToCluster_presult::read( RemoteController_executeOnController_args:: ~RemoteController_executeOnController_args() noexcept -{} +{ +} uint32_t RemoteController_executeOnController_args::read( @@ -2937,7 +2982,8 @@ RemoteController_executeOnController_args::write( RemoteController_executeOnController_pargs:: ~RemoteController_executeOnController_pargs() noexcept -{} +{ +} uint32_t RemoteController_executeOnController_pargs::write( @@ -2970,7 +3016,8 @@ RemoteController_executeOnController_pargs::write( RemoteController_executeOnController_result:: ~RemoteController_executeOnController_result() noexcept -{} +{ +} uint32_t RemoteController_executeOnController_result::read( @@ -3036,7 +3083,8 @@ RemoteController_executeOnController_result::write( RemoteController_executeOnController_presult:: ~RemoteController_executeOnController_presult() noexcept -{} +{ +} uint32_t RemoteController_executeOnController_presult::read( diff --git a/hazelcast/test/src/cpp-controller/RemoteController.h b/hazelcast/test/src/cpp-controller/RemoteController.h index bdefdaef18..4dac718971 100644 --- a/hazelcast/test/src/cpp-controller/RemoteController.h +++ b/hazelcast/test/src/cpp-controller/RemoteController.h @@ -76,7 +76,8 @@ class RemoteControllerIfSingletonFactory RemoteControllerIfSingletonFactory( const ::std::shared_ptr& iface) : iface_(iface) - {} + { + } virtual ~RemoteControllerIfSingletonFactory() {} virtual RemoteControllerIf* getHandler( @@ -215,7 +216,8 @@ typedef struct _RemoteController_ping_result__isset { _RemoteController_ping_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_ping_result__isset; @@ -227,7 +229,8 @@ class RemoteController_ping_result const RemoteController_ping_result&); RemoteController_ping_result() : success(0) - {} + { + } virtual ~RemoteController_ping_result() noexcept; bool success; @@ -257,7 +260,8 @@ typedef struct _RemoteController_ping_presult__isset { _RemoteController_ping_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_ping_presult__isset; @@ -308,7 +312,8 @@ typedef struct _RemoteController_clean_result__isset { _RemoteController_clean_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_clean_result__isset; @@ -320,7 +325,8 @@ class RemoteController_clean_result const RemoteController_clean_result&); RemoteController_clean_result() : success(0) - {} + { + } virtual ~RemoteController_clean_result() noexcept; bool success; @@ -350,7 +356,8 @@ typedef struct _RemoteController_clean_presult__isset { _RemoteController_clean_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_clean_presult__isset; @@ -401,7 +408,8 @@ typedef struct _RemoteController_exit_result__isset { _RemoteController_exit_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_exit_result__isset; @@ -413,7 +421,8 @@ class RemoteController_exit_result const RemoteController_exit_result&); RemoteController_exit_result() : success(0) - {} + { + } virtual ~RemoteController_exit_result() noexcept; bool success; @@ -443,7 +452,8 @@ typedef struct _RemoteController_exit_presult__isset { _RemoteController_exit_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_exit_presult__isset; @@ -463,7 +473,8 @@ typedef struct _RemoteController_createCluster_args__isset _RemoteController_createCluster_args__isset() : hzVersion(false) , xmlconfig(false) - {} + { + } bool hzVersion : 1; bool xmlconfig : 1; } _RemoteController_createCluster_args__isset; @@ -478,7 +489,8 @@ class RemoteController_createCluster_args RemoteController_createCluster_args() : hzVersion() , xmlconfig() - {} + { + } virtual ~RemoteController_createCluster_args() noexcept; std::string hzVersion; @@ -524,7 +536,8 @@ typedef struct _RemoteController_createCluster_result__isset _RemoteController_createCluster_result__isset() : success(false) , serverException(false) - {} + { + } bool success : 1; bool serverException : 1; } _RemoteController_createCluster_result__isset; @@ -572,7 +585,8 @@ typedef struct _RemoteController_createCluster_presult__isset _RemoteController_createCluster_presult__isset() : success(false) , serverException(false) - {} + { + } bool success : 1; bool serverException : 1; } _RemoteController_createCluster_presult__isset; @@ -594,7 +608,8 @@ typedef struct _RemoteController_createClusterKeepClusterName_args__isset _RemoteController_createClusterKeepClusterName_args__isset() : hzVersion(false) , xmlconfig(false) - {} + { + } bool hzVersion : 1; bool xmlconfig : 1; } _RemoteController_createClusterKeepClusterName_args__isset; @@ -609,7 +624,8 @@ class RemoteController_createClusterKeepClusterName_args RemoteController_createClusterKeepClusterName_args() : hzVersion() , xmlconfig() - {} + { + } virtual ~RemoteController_createClusterKeepClusterName_args() noexcept; std::string hzVersion; @@ -658,7 +674,8 @@ typedef struct _RemoteController_createClusterKeepClusterName_result__isset _RemoteController_createClusterKeepClusterName_result__isset() : success(false) , serverException(false) - {} + { + } bool success : 1; bool serverException : 1; } _RemoteController_createClusterKeepClusterName_result__isset; @@ -709,7 +726,8 @@ typedef struct _RemoteController_createClusterKeepClusterName_presult__isset _RemoteController_createClusterKeepClusterName_presult__isset() : success(false) , serverException(false) - {} + { + } bool success : 1; bool serverException : 1; } _RemoteController_createClusterKeepClusterName_presult__isset; @@ -730,7 +748,8 @@ typedef struct _RemoteController_startMember_args__isset { _RemoteController_startMember_args__isset() : clusterId(false) - {} + { + } bool clusterId : 1; } _RemoteController_startMember_args__isset; @@ -742,7 +761,8 @@ class RemoteController_startMember_args const RemoteController_startMember_args&); RemoteController_startMember_args() : clusterId() - {} + { + } virtual ~RemoteController_startMember_args() noexcept; std::string clusterId; @@ -782,7 +802,8 @@ typedef struct _RemoteController_startMember_result__isset _RemoteController_startMember_result__isset() : success(false) , serverException(false) - {} + { + } bool success : 1; bool serverException : 1; } _RemoteController_startMember_result__isset; @@ -830,7 +851,8 @@ typedef struct _RemoteController_startMember_presult__isset _RemoteController_startMember_presult__isset() : success(false) , serverException(false) - {} + { + } bool success : 1; bool serverException : 1; } _RemoteController_startMember_presult__isset; @@ -852,7 +874,8 @@ typedef struct _RemoteController_shutdownMember_args__isset _RemoteController_shutdownMember_args__isset() : clusterId(false) , memberId(false) - {} + { + } bool clusterId : 1; bool memberId : 1; } _RemoteController_shutdownMember_args__isset; @@ -867,7 +890,8 @@ class RemoteController_shutdownMember_args RemoteController_shutdownMember_args() : clusterId() , memberId() - {} + { + } virtual ~RemoteController_shutdownMember_args() noexcept; std::string clusterId; @@ -912,7 +936,8 @@ typedef struct _RemoteController_shutdownMember_result__isset { _RemoteController_shutdownMember_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_shutdownMember_result__isset; @@ -925,7 +950,8 @@ class RemoteController_shutdownMember_result const RemoteController_shutdownMember_result&); RemoteController_shutdownMember_result() : success(0) - {} + { + } virtual ~RemoteController_shutdownMember_result() noexcept; bool success; @@ -955,7 +981,8 @@ typedef struct _RemoteController_shutdownMember_presult__isset { _RemoteController_shutdownMember_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_shutdownMember_presult__isset; @@ -975,7 +1002,8 @@ typedef struct _RemoteController_terminateMember_args__isset _RemoteController_terminateMember_args__isset() : clusterId(false) , memberId(false) - {} + { + } bool clusterId : 1; bool memberId : 1; } _RemoteController_terminateMember_args__isset; @@ -990,7 +1018,8 @@ class RemoteController_terminateMember_args RemoteController_terminateMember_args() : clusterId() , memberId() - {} + { + } virtual ~RemoteController_terminateMember_args() noexcept; std::string clusterId; @@ -1035,7 +1064,8 @@ typedef struct _RemoteController_terminateMember_result__isset { _RemoteController_terminateMember_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_terminateMember_result__isset; @@ -1048,7 +1078,8 @@ class RemoteController_terminateMember_result const RemoteController_terminateMember_result&); RemoteController_terminateMember_result() : success(0) - {} + { + } virtual ~RemoteController_terminateMember_result() noexcept; bool success; @@ -1078,7 +1109,8 @@ typedef struct _RemoteController_terminateMember_presult__isset { _RemoteController_terminateMember_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_terminateMember_presult__isset; @@ -1098,7 +1130,8 @@ typedef struct _RemoteController_suspendMember_args__isset _RemoteController_suspendMember_args__isset() : clusterId(false) , memberId(false) - {} + { + } bool clusterId : 1; bool memberId : 1; } _RemoteController_suspendMember_args__isset; @@ -1113,7 +1146,8 @@ class RemoteController_suspendMember_args RemoteController_suspendMember_args() : clusterId() , memberId() - {} + { + } virtual ~RemoteController_suspendMember_args() noexcept; std::string clusterId; @@ -1158,7 +1192,8 @@ typedef struct _RemoteController_suspendMember_result__isset { _RemoteController_suspendMember_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_suspendMember_result__isset; @@ -1171,7 +1206,8 @@ class RemoteController_suspendMember_result const RemoteController_suspendMember_result&); RemoteController_suspendMember_result() : success(0) - {} + { + } virtual ~RemoteController_suspendMember_result() noexcept; bool success; @@ -1201,7 +1237,8 @@ typedef struct _RemoteController_suspendMember_presult__isset { _RemoteController_suspendMember_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_suspendMember_presult__isset; @@ -1221,7 +1258,8 @@ typedef struct _RemoteController_resumeMember_args__isset _RemoteController_resumeMember_args__isset() : clusterId(false) , memberId(false) - {} + { + } bool clusterId : 1; bool memberId : 1; } _RemoteController_resumeMember_args__isset; @@ -1236,7 +1274,8 @@ class RemoteController_resumeMember_args RemoteController_resumeMember_args() : clusterId() , memberId() - {} + { + } virtual ~RemoteController_resumeMember_args() noexcept; std::string clusterId; @@ -1281,7 +1320,8 @@ typedef struct _RemoteController_resumeMember_result__isset { _RemoteController_resumeMember_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_resumeMember_result__isset; @@ -1294,7 +1334,8 @@ class RemoteController_resumeMember_result const RemoteController_resumeMember_result&); RemoteController_resumeMember_result() : success(0) - {} + { + } virtual ~RemoteController_resumeMember_result() noexcept; bool success; @@ -1324,7 +1365,8 @@ typedef struct _RemoteController_resumeMember_presult__isset { _RemoteController_resumeMember_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_resumeMember_presult__isset; @@ -1343,7 +1385,8 @@ typedef struct _RemoteController_shutdownCluster_args__isset { _RemoteController_shutdownCluster_args__isset() : clusterId(false) - {} + { + } bool clusterId : 1; } _RemoteController_shutdownCluster_args__isset; @@ -1356,7 +1399,8 @@ class RemoteController_shutdownCluster_args const RemoteController_shutdownCluster_args&); RemoteController_shutdownCluster_args() : clusterId() - {} + { + } virtual ~RemoteController_shutdownCluster_args() noexcept; std::string clusterId; @@ -1395,7 +1439,8 @@ typedef struct _RemoteController_shutdownCluster_result__isset { _RemoteController_shutdownCluster_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_shutdownCluster_result__isset; @@ -1408,7 +1453,8 @@ class RemoteController_shutdownCluster_result const RemoteController_shutdownCluster_result&); RemoteController_shutdownCluster_result() : success(0) - {} + { + } virtual ~RemoteController_shutdownCluster_result() noexcept; bool success; @@ -1438,7 +1484,8 @@ typedef struct _RemoteController_shutdownCluster_presult__isset { _RemoteController_shutdownCluster_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_shutdownCluster_presult__isset; @@ -1457,7 +1504,8 @@ typedef struct _RemoteController_terminateCluster_args__isset { _RemoteController_terminateCluster_args__isset() : clusterId(false) - {} + { + } bool clusterId : 1; } _RemoteController_terminateCluster_args__isset; @@ -1470,7 +1518,8 @@ class RemoteController_terminateCluster_args const RemoteController_terminateCluster_args&); RemoteController_terminateCluster_args() : clusterId() - {} + { + } virtual ~RemoteController_terminateCluster_args() noexcept; std::string clusterId; @@ -1509,7 +1558,8 @@ typedef struct _RemoteController_terminateCluster_result__isset { _RemoteController_terminateCluster_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_terminateCluster_result__isset; @@ -1522,7 +1572,8 @@ class RemoteController_terminateCluster_result const RemoteController_terminateCluster_result&); RemoteController_terminateCluster_result() : success(0) - {} + { + } virtual ~RemoteController_terminateCluster_result() noexcept; bool success; @@ -1552,7 +1603,8 @@ typedef struct _RemoteController_terminateCluster_presult__isset { _RemoteController_terminateCluster_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_terminateCluster_presult__isset; @@ -1571,7 +1623,8 @@ typedef struct _RemoteController_splitMemberFromCluster_args__isset { _RemoteController_splitMemberFromCluster_args__isset() : memberId(false) - {} + { + } bool memberId : 1; } _RemoteController_splitMemberFromCluster_args__isset; @@ -1584,7 +1637,8 @@ class RemoteController_splitMemberFromCluster_args const RemoteController_splitMemberFromCluster_args&); RemoteController_splitMemberFromCluster_args() : memberId() - {} + { + } virtual ~RemoteController_splitMemberFromCluster_args() noexcept; std::string memberId; @@ -1625,7 +1679,8 @@ typedef struct _RemoteController_splitMemberFromCluster_result__isset { _RemoteController_splitMemberFromCluster_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_splitMemberFromCluster_result__isset; @@ -1668,7 +1723,8 @@ typedef struct _RemoteController_splitMemberFromCluster_presult__isset { _RemoteController_splitMemberFromCluster_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_splitMemberFromCluster_presult__isset; @@ -1688,7 +1744,8 @@ typedef struct _RemoteController_mergeMemberToCluster_args__isset _RemoteController_mergeMemberToCluster_args__isset() : clusterId(false) , memberId(false) - {} + { + } bool clusterId : 1; bool memberId : 1; } _RemoteController_mergeMemberToCluster_args__isset; @@ -1703,7 +1760,8 @@ class RemoteController_mergeMemberToCluster_args RemoteController_mergeMemberToCluster_args() : clusterId() , memberId() - {} + { + } virtual ~RemoteController_mergeMemberToCluster_args() noexcept; std::string clusterId; @@ -1748,7 +1806,8 @@ typedef struct _RemoteController_mergeMemberToCluster_result__isset { _RemoteController_mergeMemberToCluster_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_mergeMemberToCluster_result__isset; @@ -1791,7 +1850,8 @@ typedef struct _RemoteController_mergeMemberToCluster_presult__isset { _RemoteController_mergeMemberToCluster_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_mergeMemberToCluster_presult__isset; @@ -1812,7 +1872,8 @@ typedef struct _RemoteController_executeOnController_args__isset : clusterId(false) , script(false) , lang(false) - {} + { + } bool clusterId : 1; bool script : 1; bool lang : 1; @@ -1829,7 +1890,8 @@ class RemoteController_executeOnController_args : clusterId() , script() , lang((Lang::type)0) - {} + { + } virtual ~RemoteController_executeOnController_args() noexcept; std::string clusterId; @@ -1880,7 +1942,8 @@ typedef struct _RemoteController_executeOnController_result__isset { _RemoteController_executeOnController_result__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_executeOnController_result__isset; @@ -1923,7 +1986,8 @@ typedef struct _RemoteController_executeOnController_presult__isset { _RemoteController_executeOnController_presult__isset() : success(false) - {} + { + } bool success : 1; } _RemoteController_executeOnController_presult__isset; @@ -2179,7 +2243,8 @@ class RemoteControllerProcessorFactory RemoteControllerProcessorFactory( const ::std::shared_ptr& handlerFactory) : handlerFactory_(handlerFactory) - {} + { + } ::std::shared_ptr<::apache::thrift::TProcessor> getProcessor( const ::apache::thrift::TConnectionInfo& connInfo); @@ -2194,7 +2259,8 @@ class RemoteControllerMultiface : virtual public RemoteControllerIf RemoteControllerMultiface( std::vector>& ifaces) : ifaces_(ifaces) - {} + { + } virtual ~RemoteControllerMultiface() {} protected: diff --git a/hazelcast/test/src/cpp-controller/remote_controller_types.h b/hazelcast/test/src/cpp-controller/remote_controller_types.h index 1d6b8aba12..7b2ebb59be 100644 --- a/hazelcast/test/src/cpp-controller/remote_controller_types.h +++ b/hazelcast/test/src/cpp-controller/remote_controller_types.h @@ -54,7 +54,8 @@ typedef struct _Cluster__isset { _Cluster__isset() : id(false) - {} + { + } bool id : 1; } _Cluster__isset; @@ -65,7 +66,8 @@ class Cluster : public virtual ::apache::thrift::TBase Cluster& operator=(const Cluster&); Cluster() : id() - {} + { + } virtual ~Cluster() noexcept; std::string id; @@ -102,7 +104,8 @@ typedef struct _Member__isset : uuid(false) , host(false) , port(false) - {} + { + } bool uuid : 1; bool host : 1; bool port : 1; @@ -117,7 +120,8 @@ class Member : public virtual ::apache::thrift::TBase : uuid() , host() , port(0) - {} + { + } virtual ~Member() noexcept; std::string uuid; @@ -164,7 +168,8 @@ typedef struct _Response__isset : success(false) , message(false) , result(false) - {} + { + } bool success : 1; bool message : 1; bool result : 1; @@ -179,7 +184,8 @@ class Response : public virtual ::apache::thrift::TBase : success(0) , message() , result() - {} + { + } virtual ~Response() noexcept; bool success; @@ -224,7 +230,8 @@ typedef struct _ServerException__isset { _ServerException__isset() : message(false) - {} + { + } bool message : 1; } _ServerException__isset; @@ -235,7 +242,8 @@ class ServerException : public ::apache::thrift::TException ServerException& operator=(const ServerException&); ServerException() : message() - {} + { + } virtual ~ServerException() noexcept; std::string message; diff --git a/hazelcast/test/src/executor/tasks/Tasks.h b/hazelcast/test/src/executor/tasks/Tasks.h index e9098876b3..b25390e614 100644 --- a/hazelcast/test/src/executor/tasks/Tasks.h +++ b/hazelcast/test/src/executor/tasks/Tasks.h @@ -66,7 +66,8 @@ struct MapPutPartitionAwareCallable : public partition_aware MapPutPartitionAwareCallable(const std::string& map_name, T partition_key) : map_name(map_name) , partition_key(partition_key) - {} + { + } std::string map_name; T partition_key; diff --git a/hazelcast/test/src/remote_controller_client.cpp b/hazelcast/test/src/remote_controller_client.cpp index f901bb7492..666327bea5 100644 --- a/hazelcast/test/src/remote_controller_client.cpp +++ b/hazelcast/test/src/remote_controller_client.cpp @@ -81,9 +81,9 @@ cluster_version() version.minor = std::stoi(major_minor_patch.at(1)); if (major_minor_patch.size() > 2) { - version.patch = std::stoi(major_minor_patch.at(2)); + version.patch = std::stoi(major_minor_patch.at(2)); } else { - version.patch = 0; + version.patch = 0; } return version; diff --git a/hazelcast/test/src/serialization/Serializables.cpp b/hazelcast/test/src/serialization/Serializables.cpp index 59f111907f..a262b0cce0 100644 --- a/hazelcast/test/src/serialization/Serializables.cpp +++ b/hazelcast/test/src/serialization/Serializables.cpp @@ -347,7 +347,8 @@ void hz_serializer::write_data( const test::EmployeeEntryComparator& object, object_data_output& writer) -{} +{ +} test::EmployeeEntryComparator hz_serializer::read_data( @@ -373,7 +374,8 @@ void hz_serializer::write_data( const test::EmployeeEntryKeyComparator&, object_data_output&) -{} +{ +} test::EmployeeEntryKeyComparator hz_serializer::read_data(object_data_input&) diff --git a/hazelcast/test/src/sql_test.cpp b/hazelcast/test/src/sql_test.cpp index 4a376d4014..2d1cc0e4dc 100644 --- a/hazelcast/test/src/sql_test.cpp +++ b/hazelcast/test/src/sql_test.cpp @@ -339,7 +339,6 @@ class SqlTest } } - void create_mapping(std::string value_format = "INTEGER", boost::optional par_map_name = boost::none) { @@ -426,14 +425,15 @@ class SqlTest serialization::hz_serializer::PORTABLE_FACTORY_ID, serialization::hz_serializer::PORTABLE_VALUE_CLASS_ID); } - + std::shared_ptr select_all(int cursor_size = 10) { sql::sql_statement statement{ client, - (boost::format( - R"( + (boost::format( + R"( SELECT * FROM %1% - )") % map_name).str() }; + )") % map_name) + .str() }; statement.cursor_buffer_size(cursor_size); return client.get_sql().execute(statement).get(); @@ -702,22 +702,24 @@ class SqlTest ASSERT_EQ(expected_value, *value_by_name); } - int member_client_cursors(int member_number) { + int member_client_cursors(int member_number) + { auto script = - (boost::format("com.hazelcast.jet.sql.SqlTestSupport.sqlInternalService(instance_%1%).getClientStateRegistry().getCursorCount()") %member_number).str(); + (boost::format( + "com.hazelcast.jet.sql.SqlTestSupport.sqlInternalService(instance_" + "%1%).getClientStateRegistry().getCursorCount()") % + member_number) + .str(); Response response; remote_controller_client().executeOnController( - response, - server_factory_->get_cluster_id(), - script, - Lang::PYTHON); + response, server_factory_->get_cluster_id(), script, Lang::PYTHON); EXPECT_TRUE(response.success); return std::stoi(response.result); - } - int total_member_client_cursors() { + int total_member_client_cursors() + { return member_client_cursors(0) + member_client_cursors(1); } template @@ -816,7 +818,6 @@ class SqlTest ASSERT_EQ(expected_counts, actual_counts); } - }; std::unique_ptr SqlTest::server_factory_; @@ -834,7 +835,6 @@ struct generator } }; - std::string printer(const testing::TestParamInfo& type) { @@ -934,12 +934,13 @@ TEST_F(SqlTest, calling_iterator_next_consecutively) create_mapping(); (void)populate_map(map, 100); - auto handler = [this](){ + auto handler = [this]() { sql::sql_statement statement{ client, - (boost::format( - R"( + (boost::format( + R"( SELECT * FROM %1% - )") % map_name).str() }; + )") % map_name) + .str() }; statement.cursor_buffer_size(10); auto result = client.get_sql().execute(statement).get(); @@ -999,7 +1000,7 @@ TEST_F(SqlTest, simple) SELECT * FROM (VALUES ('foo', 'bar'), (NULL, 'hello')) AS X(col1, col2) )sql"); - auto &service = client.get_sql(); + auto& service = client.get_sql(); auto result = service.execute(statement).get(); ASSERT_TRUE(result->row_set()); @@ -1036,7 +1037,7 @@ TEST_F(SqlTest, rows_can_be_used_even_after_the_result_is_destroyed) SELECT * FROM (VALUES ('foo', 'bar'), (NULL, 'hello')) AS X(col1, col2) )sql"); - auto &service = client.get_sql(); + auto& service = client.get_sql(); std::shared_ptr page; @@ -1072,8 +1073,8 @@ TEST_F(SqlTest, sql_result_public_apis_should_throw_after_close) ASSERT_TRUE(result->row_set()); - it = std::make_shared( - result->iterator()); + it = + std::make_shared(result->iterator()); result->close().get(); } @@ -1096,7 +1097,7 @@ TEST_F(SqlTest, statement_with_params) if (cluster_version() < member::version{ 5, 0, 0 }) GTEST_SKIP(); - auto &service = client.get_sql(); + auto& service = client.get_sql(); auto result = service .execute("SELECT CAST(? AS VARCHAR), CAST(? AS VARCHAR)", 123456, @@ -1735,28 +1736,23 @@ TEST_F(SqlTest, find_with_page_sync_iterator) auto result = select_all(); auto found_page_itr = std::find_if( - result->pbegin(), - result->pend(), - [searchee](std::shared_ptr page){ - return find_if( - begin(page->rows()), - end(page->rows()), - [searchee](const sql::sql_page::sql_row& row){ - return row.get_object(1).value() == searchee; - } - ) != end(page->rows()); - } - ); + result->pbegin(), + result->pend(), + [searchee](std::shared_ptr page) { + return find_if(begin(page->rows()), + end(page->rows()), + [searchee](const sql::sql_page::sql_row& row) { + return row.get_object(1).value() == searchee; + }) != end(page->rows()); + }); ASSERT_NE(found_page_itr, result->pend()); - bool exist = any_of( - begin(found_page_itr->rows()), - end(found_page_itr->rows()), - [searchee](const sql::sql_page::sql_row& row){ - return row.get_object(1).value() == searchee; - } - ); + bool exist = any_of(begin(found_page_itr->rows()), + end(found_page_itr->rows()), + [searchee](const sql::sql_page::sql_row& row) { + return row.get_object(1).value() == searchee; + }); ASSERT_TRUE(exist); } @@ -1769,13 +1765,12 @@ TEST_F(SqlTest, find_with_row_sync_iterator) auto searchee = numbers[numbers.size() / 2]; auto result = select_all(); - auto found_row_itr = std::find_if( - begin(*result), - end(*result), - [searchee](const sql::sql_page::sql_row& row){ - return row.get_object(1).value() == searchee; - } - ); + auto found_row_itr = + std::find_if(begin(*result), + end(*result), + [searchee](const sql::sql_page::sql_row& row) { + return row.get_object(1).value() == searchee; + }); ASSERT_NE(found_row_itr, end(*result)); ASSERT_EQ(found_row_itr->get_object(1).value(), searchee); @@ -1792,7 +1787,7 @@ TEST_F(SqlTest, timeout_for_page_iterator_sync) auto result = client.get_sql().execute("SELECT * FROM TABLE(generate_stream(1))").get(); - auto statement = [&result](){ + auto statement = [&result]() { auto it = result->pbegin(std::chrono::milliseconds{ 1 }); ++it; ++it; @@ -1812,7 +1807,7 @@ TEST_F(SqlTest, timeout_for_row_iterator_sync) auto result = client.get_sql().execute("SELECT * FROM TABLE(generate_stream(1))").get(); - auto statement = [&result](){ + auto statement = [&result]() { auto it = result->begin(std::chrono::milliseconds{ 1 }); ++it; ++it; @@ -1932,22 +1927,23 @@ TEST_F(SqlTest, select) // If this request spawns multiple pages, then: // 1) Ensure that results are cleared when the whole result set is fetched - // 2) Ensure that results are cleared when the result set is closed in the middle. -/* - ASSERT_EQ(0, total_member_client_cursors()); + // 2) Ensure that results are cleared when the result set is closed in the + // middle. + /* + ASSERT_EQ(0, total_member_client_cursors()); - try { - auto res2 = query(map_name); + try { + auto res2 = query(map_name); - ASSERT_EQ(1, total_member_client_cursors()); + ASSERT_EQ(1, total_member_client_cursors()); - ASSERT_NO_THROW(res2.close()); + ASSERT_NO_THROW(res2.close()); - ASSERT_EQ(0, total_member_client_cursors()); - } catch (...) { - - } -*/ + ASSERT_EQ(0, total_member_client_cursors()); + } catch (...) { + + } + */ } TEST_F(SqlTest, test_partition_based_routing_simple_type_test) @@ -2269,10 +2265,12 @@ class sql_encode_test : public ::testing::Test protected: query_id get_query_id() const { - boost::uuids::uuid server_uuid{ {1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16} }; - boost::uuids::uuid client_uuid{ {21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36} }; + boost::uuids::uuid server_uuid{ + { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } + }; + boost::uuids::uuid client_uuid{ + { 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 } + }; return { server_uuid, client_uuid }; } }; @@ -2309,26 +2307,171 @@ TEST_F(sql_encode_test, execute) std::vector expected_bytes = { // first frame - 36, 0, 0, 0, 0, 192, 0, - 4, 33, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 255, 255, 255, 42, 0, 0, 0, 0, 0, - 0, 0, 210, 4, 0, 0, 5, 1, + 36, + 0, + 0, + 0, + 0, + 192, + 0, + 4, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 255, + 255, + 255, + 255, + 42, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 210, + 4, + 0, + 0, + 5, + 1, // second frame (sql string) - 29, 0, 0, 0, 0, 0, - 83, 69, 76, 69, 67, 84, 32, 42, 32, 70, 82, 79, 77, 32, - 115, 111, 109, 101, 119, 104, 101, 114, 101, + 29, + 0, + 0, + 0, + 0, + 0, + 83, + 69, + 76, + 69, + 67, + 84, + 32, + 42, + 32, + 70, + 82, + 79, + 77, + 32, + 115, + 111, + 109, + 101, + 119, + 104, + 101, + 114, + 101, // third frame std::vector encoding for parameters - 6, 0, 0, 0, 0, 16, - 6, 0, 0, 0, 0, 4, - 15, 0, 0, 0, 0, 0, - 115, 111, 109, 101, 98, 121, 116, 101, 115, - 6, 0, 0, 0, 0, 8, // end frame for parameters vector - 15, 0, 0, 0, 0, 0, 109, 121, 45, 115, 99, 104, 101, 109, 97, // schema name string frame - 6, 0, 0, 0, 0, 16, // begin frame for query_id - 38, 0, 0, 0, 0, 0, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, // server uuid - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, // client uuid - 6, 0, 0, 0, 0, 40 // end frame for query_id + 6, + 0, + 0, + 0, + 0, + 16, + 6, + 0, + 0, + 0, + 0, + 4, + 15, + 0, + 0, + 0, + 0, + 0, + 115, + 111, + 109, + 101, + 98, + 121, + 116, + 101, + 115, + 6, + 0, + 0, + 0, + 0, + 8, // end frame for parameters vector + 15, + 0, + 0, + 0, + 0, + 0, + 109, + 121, + 45, + 115, + 99, + 104, + 101, + 109, + 97, // schema name string frame + 6, + 0, + 0, + 0, + 0, + 16, // begin frame for query_id + 38, + 0, + 0, + 0, + 0, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, // server uuid + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, // client uuid + 6, + 0, + 0, + 0, + 0, + 40 // end frame for query_id }; std::vector actual_bytes = {}; @@ -2359,15 +2502,83 @@ TEST_F(sql_encode_test, fetch) std::vector expected_bytes = { // initial frame - 26, 0, 0, 0, 0, 192, 0, 5, 33, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, - 177, 203, 116, 0, 6, 0, 0, 0, 0, 16, // begin frame for - // query_id - 38, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, // server uuid - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, // client uuid - 6, 0, 0, 0, 0, 40 // end frame for query_id + 26, + 0, + 0, + 0, + 0, + 192, + 0, + 5, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 255, + 255, + 255, + 255, + 177, + 203, + 116, + 0, + 6, + 0, + 0, + 0, + 0, + 16, // begin frame for + // query_id + 38, + 0, + 0, + 0, + 0, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, // server uuid + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, // client uuid + 6, + 0, + 0, + 0, + 0, + 40 // end frame for query_id }; ASSERT_EQ(actual_bytes.size(), expected_bytes.size()); @@ -2384,19 +2595,83 @@ TEST_F(sql_encode_test, close) actual_bytes.insert(actual_bytes.end(), buf.begin(), buf.end()); } - std::vector - expected_bytes = { - // initial frame - 22, 0, 0, 0, 0, 192, 0, 3, 33, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 255, 255, 255, 6, 0, 0, 0, 0, 16, // begin frame - // for - // query_id - 38, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, // server uuid - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, // client uuid - 6, 0, 0, 0, 0, 40 // end frame for query_id - }; + std::vector expected_bytes = { + // initial frame + 22, + 0, + 0, + 0, + 0, + 192, + 0, + 3, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 255, + 255, + 255, + 255, + 6, + 0, + 0, + 0, + 0, + 16, // begin frame + // for + // query_id + 38, + 0, + 0, + 0, + 0, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, // server uuid + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, // client uuid + 6, + 0, + 0, + 0, + 0, + 40 // end frame for query_id + }; ASSERT_EQ(actual_bytes.size(), expected_bytes.size()); EXPECT_EQ(expected_bytes, actual_bytes);