From 7c07d6a2fa7f605466fd0612f7c44a0478c45ce2 Mon Sep 17 00:00:00 2001 From: mdumandag Date: Wed, 6 Jan 2021 12:31:14 +0300 Subject: [PATCH 1/2] Lint hazelcast/protocol Removed exclusion of `hazelcast/protocol` folder and linted the files there. --- hazelcast/protocol/__init__.py | 65 +++++++++++---- hazelcast/protocol/builtin.py | 48 ++++++++--- hazelcast/protocol/client_message.py | 11 ++- .../codec/atomic_long_add_and_get_codec.py | 7 +- .../protocol/codec/atomic_long_alter_codec.py | 7 +- .../protocol/codec/atomic_long_apply_codec.py | 6 +- .../atomic_long_compare_and_set_codec.py | 7 +- .../codec/atomic_long_get_and_add_codec.py | 7 +- .../codec/atomic_long_get_and_set_codec.py | 7 +- .../protocol/codec/atomic_long_get_codec.py | 7 +- .../protocol/codec/atomic_ref_apply_codec.py | 6 +- .../codec/atomic_ref_compare_and_set_codec.py | 7 +- .../codec/atomic_ref_contains_codec.py | 7 +- .../protocol/codec/atomic_ref_get_codec.py | 6 +- .../protocol/codec/atomic_ref_set_codec.py | 6 +- .../client_add_cluster_view_listener_codec.py | 20 ++++- ...t_add_distributed_object_listener_codec.py | 17 +++- ...lient_add_partition_lost_listener_codec.py | 33 ++++++-- .../codec/client_authentication_codec.py | 43 ++++++++-- .../client_authentication_custom_codec.py | 42 ++++++++-- .../codec/client_create_proxies_codec.py | 6 +- .../codec/client_create_proxy_codec.py | 6 +- .../codec/client_destroy_proxy_codec.py | 6 +- .../client_get_distributed_objects_codec.py | 6 +- .../client_local_backup_listener_codec.py | 12 ++- hazelcast/protocol/codec/client_ping_codec.py | 6 +- ...emove_distributed_object_listener_codec.py | 7 +- ...nt_remove_partition_lost_listener_codec.py | 7 +- .../protocol/codec/client_statistics_codec.py | 6 +- ...ient_trigger_partition_assignment_codec.py | 6 +- .../codec/count_down_latch_await_codec.py | 7 +- .../count_down_latch_count_down_codec.py | 6 +- .../codec/count_down_latch_get_count_codec.py | 7 +- .../codec/count_down_latch_get_round_codec.py | 7 +- .../count_down_latch_try_set_count_codec.py | 7 +- .../codec/cp_group_create_cp_group_codec.py | 6 +- .../codec/cp_group_destroy_cp_object_codec.py | 6 +- .../codec/cp_session_close_session_codec.py | 7 +- .../codec/cp_session_create_session_codec.py | 19 ++++- .../cp_session_generate_thread_id_codec.py | 7 +- .../cp_session_heartbeat_session_codec.py | 6 +- .../protocol/codec/custom/address_codec.py | 7 +- .../custom/anchor_data_list_holder_codec.py | 4 +- .../custom/bitmap_index_options_codec.py | 23 +++++- .../codec/custom/endpoint_qualifier_codec.py | 11 ++- .../codec/custom/error_holder_codec.py | 19 ++++- .../codec/custom/index_config_codec.py | 11 ++- .../codec/custom/member_info_codec.py | 27 ++++-- .../codec/custom/member_version_codec.py | 19 ++++- .../custom/paging_predicate_holder_codec.py | 39 +++++++-- .../codec/custom/raft_group_id_codec.py | 7 +- .../codec/custom/simple_entry_view_codec.py | 82 +++++++++++++++---- .../codec/custom/stack_trace_element_codec.py | 15 +++- ...executor_service_cancel_on_member_codec.py | 7 +- ...cutor_service_cancel_on_partition_codec.py | 7 +- .../executor_service_is_shutdown_codec.py | 7 +- .../codec/executor_service_shutdown_codec.py | 6 +- ...executor_service_submit_to_member_codec.py | 6 +- ...cutor_service_submit_to_partition_codec.py | 6 +- .../fenced_lock_get_lock_ownership_codec.py | 19 ++++- .../protocol/codec/fenced_lock_lock_codec.py | 7 +- .../codec/fenced_lock_try_lock_codec.py | 7 +- .../codec/fenced_lock_unlock_codec.py | 7 +- .../flake_id_generator_new_id_batch_codec.py | 15 +++- .../protocol/codec/list_add_all_codec.py | 7 +- .../codec/list_add_all_with_index_codec.py | 7 +- hazelcast/protocol/codec/list_add_codec.py | 7 +- .../protocol/codec/list_add_listener_codec.py | 8 +- .../codec/list_add_with_index_codec.py | 6 +- hazelcast/protocol/codec/list_clear_codec.py | 6 +- .../list_compare_and_remove_all_codec.py | 7 +- .../list_compare_and_retain_all_codec.py | 7 +- .../protocol/codec/list_contains_all_codec.py | 7 +- .../protocol/codec/list_contains_codec.py | 7 +- .../protocol/codec/list_get_all_codec.py | 6 +- hazelcast/protocol/codec/list_get_codec.py | 6 +- .../protocol/codec/list_index_of_codec.py | 7 +- .../protocol/codec/list_is_empty_codec.py | 7 +- .../protocol/codec/list_iterator_codec.py | 6 +- .../codec/list_last_index_of_codec.py | 7 +- .../codec/list_list_iterator_codec.py | 6 +- hazelcast/protocol/codec/list_remove_codec.py | 7 +- .../codec/list_remove_listener_codec.py | 7 +- .../codec/list_remove_with_index_codec.py | 6 +- hazelcast/protocol/codec/list_set_codec.py | 6 +- hazelcast/protocol/codec/list_size_codec.py | 7 +- hazelcast/protocol/codec/list_sub_codec.py | 6 +- .../codec/map_add_entry_listener_codec.py | 20 ++++- .../map_add_entry_listener_to_key_codec.py | 20 ++++- ...ry_listener_to_key_with_predicate_codec.py | 20 ++++- ...add_entry_listener_with_predicate_codec.py | 20 ++++- .../protocol/codec/map_add_index_codec.py | 6 +- .../codec/map_add_interceptor_codec.py | 6 +- ..._near_cache_invalidation_listener_codec.py | 38 +++++++-- .../map_add_partition_lost_listener_codec.py | 25 ++++-- .../protocol/codec/map_aggregate_codec.py | 6 +- .../map_aggregate_with_predicate_codec.py | 6 +- hazelcast/protocol/codec/map_clear_codec.py | 6 +- .../protocol/codec/map_contains_key_codec.py | 7 +- .../codec/map_contains_value_codec.py | 7 +- hazelcast/protocol/codec/map_delete_codec.py | 6 +- ...map_entries_with_paging_predicate_codec.py | 6 +- .../codec/map_entries_with_predicate_codec.py | 6 +- .../protocol/codec/map_entry_set_codec.py | 6 +- .../codec/map_event_journal_read_codec.py | 15 +++- .../map_event_journal_subscribe_codec.py | 15 +++- .../protocol/codec/map_evict_all_codec.py | 6 +- hazelcast/protocol/codec/map_evict_codec.py | 7 +- .../codec/map_execute_on_all_keys_codec.py | 6 +- .../codec/map_execute_on_key_codec.py | 6 +- .../codec/map_execute_on_keys_codec.py | 6 +- .../codec/map_execute_with_predicate_codec.py | 6 +- hazelcast/protocol/codec/map_flush_codec.py | 6 +- .../protocol/codec/map_force_unlock_codec.py | 6 +- hazelcast/protocol/codec/map_get_all_codec.py | 6 +- hazelcast/protocol/codec/map_get_codec.py | 6 +- .../codec/map_get_entry_view_codec.py | 11 ++- .../protocol/codec/map_is_empty_codec.py | 7 +- .../protocol/codec/map_is_locked_codec.py | 7 +- hazelcast/protocol/codec/map_key_set_codec.py | 6 +- ...map_key_set_with_paging_predicate_codec.py | 6 +- .../codec/map_key_set_with_predicate_codec.py | 6 +- .../protocol/codec/map_load_all_codec.py | 10 ++- .../codec/map_load_given_keys_codec.py | 10 ++- hazelcast/protocol/codec/map_lock_codec.py | 6 +- hazelcast/protocol/codec/map_project_codec.py | 6 +- .../codec/map_project_with_predicate_codec.py | 6 +- hazelcast/protocol/codec/map_put_all_codec.py | 6 +- hazelcast/protocol/codec/map_put_codec.py | 6 +- .../protocol/codec/map_put_if_absent_codec.py | 6 +- .../map_put_if_absent_with_max_idle_codec.py | 6 +- .../protocol/codec/map_put_transient_codec.py | 6 +- .../map_put_transient_with_max_idle_codec.py | 6 +- .../codec/map_put_with_max_idle_codec.py | 6 +- .../protocol/codec/map_remove_all_codec.py | 6 +- hazelcast/protocol/codec/map_remove_codec.py | 6 +- .../codec/map_remove_entry_listener_codec.py | 7 +- .../codec/map_remove_if_same_codec.py | 7 +- .../codec/map_remove_interceptor_codec.py | 7 +- ...ap_remove_partition_lost_listener_codec.py | 7 +- hazelcast/protocol/codec/map_replace_codec.py | 6 +- .../codec/map_replace_if_same_codec.py | 7 +- hazelcast/protocol/codec/map_set_codec.py | 6 +- hazelcast/protocol/codec/map_set_ttl_codec.py | 7 +- .../codec/map_set_with_max_idle_codec.py | 6 +- hazelcast/protocol/codec/map_size_codec.py | 7 +- .../protocol/codec/map_submit_to_key_codec.py | 6 +- .../protocol/codec/map_try_lock_codec.py | 7 +- hazelcast/protocol/codec/map_try_put_codec.py | 7 +- .../protocol/codec/map_try_remove_codec.py | 7 +- hazelcast/protocol/codec/map_unlock_codec.py | 6 +- hazelcast/protocol/codec/map_values_codec.py | 6 +- .../map_values_with_paging_predicate_codec.py | 6 +- .../codec/map_values_with_predicate_codec.py | 6 +- .../multi_map_add_entry_listener_codec.py | 20 ++++- ...lti_map_add_entry_listener_to_key_codec.py | 20 ++++- .../protocol/codec/multi_map_clear_codec.py | 6 +- .../codec/multi_map_contains_entry_codec.py | 7 +- .../codec/multi_map_contains_key_codec.py | 7 +- .../codec/multi_map_contains_value_codec.py | 7 +- .../protocol/codec/multi_map_delete_codec.py | 6 +- .../codec/multi_map_entry_set_codec.py | 6 +- .../codec/multi_map_force_unlock_codec.py | 6 +- .../protocol/codec/multi_map_get_codec.py | 6 +- .../codec/multi_map_is_locked_codec.py | 7 +- .../protocol/codec/multi_map_key_set_codec.py | 6 +- .../protocol/codec/multi_map_lock_codec.py | 6 +- .../protocol/codec/multi_map_put_codec.py | 7 +- .../protocol/codec/multi_map_remove_codec.py | 6 +- .../codec/multi_map_remove_entry_codec.py | 7 +- .../multi_map_remove_entry_listener_codec.py | 7 +- .../protocol/codec/multi_map_size_codec.py | 7 +- .../codec/multi_map_try_lock_codec.py | 7 +- .../protocol/codec/multi_map_unlock_codec.py | 6 +- .../codec/multi_map_value_count_codec.py | 7 +- .../protocol/codec/multi_map_values_codec.py | 6 +- .../protocol/codec/pn_counter_add_codec.py | 11 ++- .../protocol/codec/pn_counter_get_codec.py | 11 ++- ...nter_get_configured_replica_count_codec.py | 7 +- .../protocol/codec/queue_add_all_codec.py | 7 +- .../codec/queue_add_listener_codec.py | 8 +- hazelcast/protocol/codec/queue_clear_codec.py | 6 +- .../queue_compare_and_remove_all_codec.py | 7 +- .../queue_compare_and_retain_all_codec.py | 7 +- .../codec/queue_contains_all_codec.py | 7 +- .../protocol/codec/queue_contains_codec.py | 7 +- .../protocol/codec/queue_drain_to_codec.py | 6 +- .../codec/queue_drain_to_max_size_codec.py | 6 +- .../protocol/codec/queue_is_empty_codec.py | 7 +- .../protocol/codec/queue_iterator_codec.py | 6 +- hazelcast/protocol/codec/queue_offer_codec.py | 7 +- hazelcast/protocol/codec/queue_peek_codec.py | 6 +- hazelcast/protocol/codec/queue_poll_codec.py | 6 +- hazelcast/protocol/codec/queue_put_codec.py | 6 +- .../codec/queue_remaining_capacity_codec.py | 7 +- .../protocol/codec/queue_remove_codec.py | 7 +- .../codec/queue_remove_listener_codec.py | 7 +- hazelcast/protocol/codec/queue_size_codec.py | 7 +- hazelcast/protocol/codec/queue_take_codec.py | 6 +- ...replicated_map_add_entry_listener_codec.py | 20 ++++- ...ted_map_add_entry_listener_to_key_codec.py | 20 ++++- ...ry_listener_to_key_with_predicate_codec.py | 20 ++++- ...add_entry_listener_with_predicate_codec.py | 20 ++++- ...map_add_near_cache_entry_listener_codec.py | 20 ++++- .../codec/replicated_map_clear_codec.py | 6 +- .../replicated_map_contains_key_codec.py | 7 +- .../replicated_map_contains_value_codec.py | 7 +- .../codec/replicated_map_entry_set_codec.py | 6 +- .../codec/replicated_map_get_codec.py | 6 +- .../codec/replicated_map_is_empty_codec.py | 7 +- .../codec/replicated_map_key_set_codec.py | 6 +- .../codec/replicated_map_put_all_codec.py | 6 +- .../codec/replicated_map_put_codec.py | 6 +- .../codec/replicated_map_remove_codec.py | 6 +- ...licated_map_remove_entry_listener_codec.py | 7 +- .../codec/replicated_map_size_codec.py | 7 +- .../codec/replicated_map_values_codec.py | 6 +- .../codec/ringbuffer_add_all_codec.py | 7 +- .../protocol/codec/ringbuffer_add_codec.py | 7 +- .../codec/ringbuffer_capacity_codec.py | 7 +- .../codec/ringbuffer_head_sequence_codec.py | 7 +- .../codec/ringbuffer_read_many_codec.py | 15 +++- .../codec/ringbuffer_read_one_codec.py | 6 +- .../ringbuffer_remaining_capacity_codec.py | 7 +- .../protocol/codec/ringbuffer_size_codec.py | 7 +- .../codec/ringbuffer_tail_sequence_codec.py | 7 +- .../protocol/codec/semaphore_acquire_codec.py | 7 +- .../semaphore_available_permits_codec.py | 7 +- .../protocol/codec/semaphore_change_codec.py | 7 +- .../protocol/codec/semaphore_drain_codec.py | 7 +- .../semaphore_get_semaphore_type_codec.py | 7 +- .../protocol/codec/semaphore_init_codec.py | 7 +- .../protocol/codec/semaphore_release_codec.py | 7 +- hazelcast/protocol/codec/set_add_all_codec.py | 7 +- hazelcast/protocol/codec/set_add_codec.py | 7 +- .../protocol/codec/set_add_listener_codec.py | 8 +- hazelcast/protocol/codec/set_clear_codec.py | 6 +- .../codec/set_compare_and_remove_all_codec.py | 7 +- .../codec/set_compare_and_retain_all_codec.py | 7 +- .../protocol/codec/set_contains_all_codec.py | 7 +- .../protocol/codec/set_contains_codec.py | 7 +- hazelcast/protocol/codec/set_get_all_codec.py | 6 +- .../protocol/codec/set_is_empty_codec.py | 7 +- hazelcast/protocol/codec/set_remove_codec.py | 7 +- .../codec/set_remove_listener_codec.py | 7 +- hazelcast/protocol/codec/set_size_codec.py | 7 +- .../codec/topic_add_message_listener_codec.py | 12 ++- .../protocol/codec/topic_publish_codec.py | 6 +- .../topic_remove_message_listener_codec.py | 7 +- .../codec/transaction_commit_codec.py | 6 +- .../codec/transaction_create_codec.py | 7 +- .../codec/transaction_rollback_codec.py | 6 +- .../codec/transactional_list_add_codec.py | 7 +- .../codec/transactional_list_remove_codec.py | 7 +- .../codec/transactional_list_size_codec.py | 7 +- .../transactional_map_contains_key_codec.py | 7 +- .../transactional_map_contains_value_codec.py | 7 +- .../codec/transactional_map_delete_codec.py | 6 +- .../codec/transactional_map_get_codec.py | 6 +- .../transactional_map_get_for_update_codec.py | 6 +- .../codec/transactional_map_is_empty_codec.py | 7 +- .../codec/transactional_map_key_set_codec.py | 6 +- ...tional_map_key_set_with_predicate_codec.py | 6 +- .../codec/transactional_map_put_codec.py | 6 +- .../transactional_map_put_if_absent_codec.py | 6 +- .../codec/transactional_map_remove_codec.py | 6 +- .../transactional_map_remove_if_same_codec.py | 7 +- .../codec/transactional_map_replace_codec.py | 6 +- ...transactional_map_replace_if_same_codec.py | 7 +- .../codec/transactional_map_set_codec.py | 6 +- .../codec/transactional_map_size_codec.py | 7 +- .../codec/transactional_map_values_codec.py | 6 +- ...ctional_map_values_with_predicate_codec.py | 6 +- .../transactional_multi_map_get_codec.py | 6 +- .../transactional_multi_map_put_codec.py | 7 +- .../transactional_multi_map_remove_codec.py | 6 +- ...nsactional_multi_map_remove_entry_codec.py | 7 +- .../transactional_multi_map_size_codec.py | 7 +- ...ansactional_multi_map_value_count_codec.py | 7 +- .../codec/transactional_queue_offer_codec.py | 7 +- .../codec/transactional_queue_peek_codec.py | 6 +- .../codec/transactional_queue_poll_codec.py | 6 +- .../codec/transactional_queue_size_codec.py | 7 +- .../codec/transactional_queue_take_codec.py | 6 +- .../codec/transactional_set_add_codec.py | 7 +- .../codec/transactional_set_remove_codec.py | 7 +- .../codec/transactional_set_size_codec.py | 7 +- pyproject.toml | 3 +- 288 files changed, 2131 insertions(+), 446 deletions(-) diff --git a/hazelcast/protocol/__init__.py b/hazelcast/protocol/__init__.py index cafd66f1e5..ce2c6d2325 100644 --- a/hazelcast/protocol/__init__.py +++ b/hazelcast/protocol/__init__.py @@ -11,9 +11,13 @@ def __init__(self, error_code, class_name, message, stack_trace_elements): self.stack_trace_elements = stack_trace_elements def __eq__(self, other): - return isinstance(other, ErrorHolder) and self.error_code == other.error_code \ - and self.class_name == other.class_name and self.message == other.message \ - and self.stack_trace_elements == other.stack_trace_elements + return ( + isinstance(other, ErrorHolder) + and self.error_code == other.error_code + and self.class_name == other.class_name + and self.message == other.message + and self.stack_trace_elements == other.stack_trace_elements + ) def __ne__(self, other): return not self.__eq__(other) @@ -29,9 +33,13 @@ def __init__(self, class_name, method_name, file_name, line_number): self.line_number = line_number def __eq__(self, other): - return isinstance(other, StackTraceElement) and self.class_name == other.class_name \ - and self.method_name == other.method_name and self.file_name == other.file_name \ - and self.line_number == other.line_number + return ( + isinstance(other, StackTraceElement) + and self.class_name == other.class_name + and self.method_name == other.method_name + and self.file_name == other.file_name + and self.line_number == other.line_number + ) def __ne__(self, other): return not self.__eq__(other) @@ -53,10 +61,12 @@ def __init__(self, name, seed, group_id): self.id = group_id def __eq__(self, other): - return isinstance(other, RaftGroupId) \ - and self.name == other.name \ - and self.seed == other.seed \ - and self.id == other.id + return ( + isinstance(other, RaftGroupId) + and self.name == other.name + and self.seed == other.seed + and self.id == other.id + ) def __ne__(self, other): return not self.__eq__(other) @@ -90,11 +100,25 @@ def as_anchor_list(self, to_object): class PagingPredicateHolder(object): __slots__ = ( - "anchor_data_list_holder", "predicate_data", "comparator_data", "page_size", "page", "iteration_type_id", - "partition_key_data") - - def __init__(self, anchor_data_list_holder, predicate_data, comparator_data, page_size, page, iteration_type_id, - partition_key_data): + "anchor_data_list_holder", + "predicate_data", + "comparator_data", + "page_size", + "page", + "iteration_type_id", + "partition_key_data", + ) + + def __init__( + self, + anchor_data_list_holder, + predicate_data, + comparator_data, + page_size, + page, + iteration_type_id, + partition_key_data, + ): self.anchor_data_list_holder = anchor_data_list_holder self.predicate_data = predicate_data self.comparator_data = comparator_data @@ -120,5 +144,12 @@ def of(predicate, to_data): comparator_data = to_data(predicate.comparator) iteration_type = predicate.iteration_type - return PagingPredicateHolder(anchor_data_list_holder, predicate_data, comparator_data, predicate.page_size, - predicate.page, iteration_type, None) + return PagingPredicateHolder( + anchor_data_list_holder, + predicate_data, + comparator_data, + predicate.page_size, + predicate.page, + iteration_type, + None, + ) diff --git a/hazelcast/protocol/builtin.py b/hazelcast/protocol/builtin.py index d99ede5082..e28c5fb7a3 100644 --- a/hazelcast/protocol/builtin.py +++ b/hazelcast/protocol/builtin.py @@ -2,10 +2,28 @@ from hazelcast import six from hazelcast.six.moves import range -from hazelcast.protocol.client_message import NULL_FRAME_BUF, BEGIN_FRAME_BUF, END_FRAME_BUF, \ - SIZE_OF_FRAME_LENGTH_AND_FLAGS, _IS_FINAL_FLAG, NULL_FINAL_FRAME_BUF, END_FINAL_FRAME_BUF -from hazelcast.serialization import LONG_SIZE_IN_BYTES, UUID_SIZE_IN_BYTES, LE_INT, LE_LONG, BOOLEAN_SIZE_IN_BYTES, \ - INT_SIZE_IN_BYTES, LE_ULONG, LE_UINT16, LE_INT8, UUID_MSB_SHIFT, UUID_LSB_MASK +from hazelcast.protocol.client_message import ( + NULL_FRAME_BUF, + BEGIN_FRAME_BUF, + END_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + _IS_FINAL_FLAG, + NULL_FINAL_FRAME_BUF, + END_FINAL_FRAME_BUF, +) +from hazelcast.serialization import ( + LONG_SIZE_IN_BYTES, + UUID_SIZE_IN_BYTES, + LE_INT, + LE_LONG, + BOOLEAN_SIZE_IN_BYTES, + INT_SIZE_IN_BYTES, + LE_ULONG, + LE_UINT16, + LE_INT8, + UUID_MSB_SHIFT, + UUID_LSB_MASK, +) from hazelcast.serialization.data import Data @@ -145,7 +163,6 @@ def decode_nullable(msg, key_decoder, value_decoder): class EntryListUUIDLongCodec(object): - @staticmethod def encode(buf, entries, is_final=False): n = len(entries) @@ -251,7 +268,10 @@ def decode_uuid(buf, offset): msb_offset = offset + BOOLEAN_SIZE_IN_BYTES lsb_offset = msb_offset + LONG_SIZE_IN_BYTES - b = buf[lsb_offset - 1:msb_offset - 1:-1] + buf[lsb_offset + LONG_SIZE_IN_BYTES - 1:lsb_offset - 1:-1] + b = ( + buf[lsb_offset - 1 : msb_offset - 1 : -1] + + buf[lsb_offset + LONG_SIZE_IN_BYTES - 1 : lsb_offset - 1 : -1] + ) return uuid.UUID(bytes=bytes(b)) @@ -265,7 +285,9 @@ def encode(buf, arr, is_final=False): if is_final: LE_UINT16.pack_into(b, INT_SIZE_IN_BYTES, _IS_FINAL_FLAG) for i in range(n): - FixSizedTypesCodec.encode_int(b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * INT_SIZE_IN_BYTES, arr[i]) + FixSizedTypesCodec.encode_int( + b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * INT_SIZE_IN_BYTES, arr[i] + ) buf.extend(b) @staticmethod @@ -288,7 +310,9 @@ def encode(buf, arr, is_final=False): if is_final: LE_UINT16.pack_into(b, INT_SIZE_IN_BYTES, _IS_FINAL_FLAG) for i in range(n): - FixSizedTypesCodec.encode_long(b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * LONG_SIZE_IN_BYTES, arr[i]) + FixSizedTypesCodec.encode_long( + b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * LONG_SIZE_IN_BYTES, arr[i] + ) buf.extend(b) @staticmethod @@ -376,7 +400,9 @@ def encode(buf, arr, is_final=False): if is_final: LE_UINT16.pack_into(b, INT_SIZE_IN_BYTES, _IS_FINAL_FLAG) for i in range(n): - FixSizedTypesCodec.encode_uuid(b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * UUID_SIZE_IN_BYTES, arr[i]) + FixSizedTypesCodec.encode_uuid( + b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * UUID_SIZE_IN_BYTES, arr[i] + ) buf.extend(b) @staticmethod @@ -399,7 +425,9 @@ def encode(buf, arr, is_final=False): if is_final: LE_UINT16.pack_into(b, INT_SIZE_IN_BYTES, _IS_FINAL_FLAG) for i in range(n): - FixSizedTypesCodec.encode_long(b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * LONG_SIZE_IN_BYTES, arr[i]) + FixSizedTypesCodec.encode_long( + b, SIZE_OF_FRAME_LENGTH_AND_FLAGS + i * LONG_SIZE_IN_BYTES, arr[i] + ) buf.extend(b) @staticmethod diff --git a/hazelcast/protocol/client_message.py b/hazelcast/protocol/client_message.py index cb1bfe84cf..45010ab0d7 100644 --- a/hazelcast/protocol/client_message.py +++ b/hazelcast/protocol/client_message.py @@ -92,8 +92,11 @@ def set_backup_aware_flag(self): def __repr__(self): message_type = LE_INT.unpack_from(self.buf, _OUTBOUND_MESSAGE_MESSAGE_TYPE_OFFSET)[0] correlation_id = self.get_correlation_id() - return "OutboundMessage(message_type=%s, correlation_id=%s, retryable=%s)" \ - % (message_type, correlation_id, self.retryable) + return "OutboundMessage(message_type=%s, correlation_id=%s, retryable=%s)" % ( + message_type, + correlation_id, + self.retryable, + ) class Frame(object): @@ -213,7 +216,9 @@ def __repr__(self): # Has END_DATA_STRUCTURE and IS_FINAL flags END_FINAL_FRAME_BUF = bytearray(SIZE_OF_FRAME_LENGTH_AND_FLAGS) LE_INT.pack_into(END_FINAL_FRAME_BUF, 0, SIZE_OF_FRAME_LENGTH_AND_FLAGS) -LE_UINT16.pack_into(END_FINAL_FRAME_BUF, INT_SIZE_IN_BYTES, _END_DATA_STRUCTURE_FLAG | _IS_FINAL_FLAG) +LE_UINT16.pack_into( + END_FINAL_FRAME_BUF, INT_SIZE_IN_BYTES, _END_DATA_STRUCTURE_FLAG | _IS_FINAL_FLAG +) class ClientMessageBuilder(object): diff --git a/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py b/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py index fa9bd8ed19..97683a67d9 100644 --- a/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py +++ b/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_alter_codec.py b/hazelcast/protocol/codec/atomic_long_alter_codec.py index d732af1574..58cf630c0a 100644 --- a/hazelcast/protocol/codec/atomic_long_alter_codec.py +++ b/hazelcast/protocol/codec/atomic_long_alter_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_long_apply_codec.py b/hazelcast/protocol/codec/atomic_long_apply_codec.py index 27d1894622..d40483e79c 100644 --- a/hazelcast/protocol/codec/atomic_long_apply_codec.py +++ b/hazelcast/protocol/codec/atomic_long_apply_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py b/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py index 5e7a7138e1..1ed415fc5a 100644 --- a/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py +++ b/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py b/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py index 6c5a6cd0d4..39161b090a 100644 --- a/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py +++ b/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py b/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py index 6926a98f03..7603277aee 100644 --- a/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py +++ b/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_get_codec.py b/hazelcast/protocol/codec/atomic_long_get_codec.py index 832a8b4045..9ecc806c06 100644 --- a/hazelcast/protocol/codec/atomic_long_get_codec.py +++ b/hazelcast/protocol/codec/atomic_long_get_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_ref_apply_codec.py b/hazelcast/protocol/codec/atomic_ref_apply_codec.py index 45780714f0..9207ccbc5b 100644 --- a/hazelcast/protocol/codec/atomic_ref_apply_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_apply_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py b/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py index 1e91ef8c95..40920cf1df 100644 --- a/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_contains_codec.py b/hazelcast/protocol/codec/atomic_ref_contains_codec.py index b0e9ae1e19..6a61fb0b96 100644 --- a/hazelcast/protocol/codec/atomic_ref_contains_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_contains_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_get_codec.py b/hazelcast/protocol/codec/atomic_ref_get_codec.py index fc0786affb..19c5392e3d 100644 --- a/hazelcast/protocol/codec/atomic_ref_get_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_get_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_set_codec.py b/hazelcast/protocol/codec/atomic_ref_set_codec.py index b10c9d120d..8add83798c 100644 --- a/hazelcast/protocol/codec/atomic_ref_set_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_set_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py b/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py index e4306ab338..775f81c723 100644 --- a/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py +++ b/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.codec.custom.member_info_codec import MemberInfoCodec from hazelcast.protocol.builtin import EntryListUUIDListIntegerCodec @@ -27,13 +32,20 @@ def handle(msg, handle_members_view_event=None, handle_partitions_view_event=Non message_type = msg.get_message_type() if message_type == _EVENT_MEMBERS_VIEW_MESSAGE_TYPE and handle_members_view_event is not None: initial_frame = msg.next_frame() - version = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_MEMBERS_VIEW_VERSION_OFFSET) + version = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_MEMBERS_VIEW_VERSION_OFFSET + ) member_infos = ListMultiFrameCodec.decode(msg, MemberInfoCodec.decode) handle_members_view_event(version, member_infos) return - if message_type == _EVENT_PARTITIONS_VIEW_MESSAGE_TYPE and handle_partitions_view_event is not None: + if ( + message_type == _EVENT_PARTITIONS_VIEW_MESSAGE_TYPE + and handle_partitions_view_event is not None + ): initial_frame = msg.next_frame() - version = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_PARTITIONS_VIEW_VERSION_OFFSET) + version = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_PARTITIONS_VIEW_VERSION_OFFSET + ) partitions = EntryListUUIDListIntegerCodec.decode(msg) handle_partitions_view_event(version, partitions) return diff --git a/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py b/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py index 50e22ee776..f008532067 100644 --- a/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py +++ b/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x000900 @@ -29,9 +35,14 @@ def decode_response(msg): def handle(msg, handle_distributed_object_event=None): message_type = msg.get_message_type() - if message_type == _EVENT_DISTRIBUTED_OBJECT_MESSAGE_TYPE and handle_distributed_object_event is not None: + if ( + message_type == _EVENT_DISTRIBUTED_OBJECT_MESSAGE_TYPE + and handle_distributed_object_event is not None + ): initial_frame = msg.next_frame() - source = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_DISTRIBUTED_OBJECT_SOURCE_OFFSET) + source = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _EVENT_DISTRIBUTED_OBJECT_SOURCE_OFFSET + ) name = StringCodec.decode(msg) service_name = StringCodec.decode(msg) event_type = StringCodec.decode(msg) diff --git a/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py b/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py index 0458a08d45..f28ac71189 100644 --- a/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) # hex: 0x000600 _REQUEST_MESSAGE_TYPE = 1536 @@ -13,8 +19,12 @@ _REQUEST_INITIAL_FRAME_SIZE = _REQUEST_LOCAL_ONLY_OFFSET + BOOLEAN_SIZE_IN_BYTES _RESPONSE_RESPONSE_OFFSET = RESPONSE_HEADER_SIZE _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET = EVENT_HEADER_SIZE -_EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET = _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES -_EVENT_PARTITION_LOST_SOURCE_OFFSET = _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET + INT_SIZE_IN_BYTES +_EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET = ( + _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES +) +_EVENT_PARTITION_LOST_SOURCE_OFFSET = ( + _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET + INT_SIZE_IN_BYTES +) def encode_request(local_only): @@ -30,10 +40,19 @@ def decode_response(msg): def handle(msg, handle_partition_lost_event=None): message_type = msg.get_message_type() - if message_type == _EVENT_PARTITION_LOST_MESSAGE_TYPE and handle_partition_lost_event is not None: + if ( + message_type == _EVENT_PARTITION_LOST_MESSAGE_TYPE + and handle_partition_lost_event is not None + ): initial_frame = msg.next_frame() - partition_id = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET) - lost_backup_count = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET) - source = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_PARTITION_LOST_SOURCE_OFFSET) + partition_id = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET + ) + lost_backup_count = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET + ) + source = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _EVENT_PARTITION_LOST_SOURCE_OFFSET + ) handle_partition_lost_event(partition_id, lost_backup_count, source) return diff --git a/hazelcast/protocol/codec/client_authentication_codec.py b/hazelcast/protocol/codec/client_authentication_codec.py index e5a03ee477..cd3ea59982 100644 --- a/hazelcast/protocol/codec/client_authentication_codec.py +++ b/hazelcast/protocol/codec/client_authentication_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import CodecUtil from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -22,10 +27,22 @@ _RESPONSE_FAILOVER_SUPPORTED_OFFSET = _RESPONSE_CLUSTER_ID_OFFSET + UUID_SIZE_IN_BYTES -def encode_request(cluster_name, username, password, uuid, client_type, serialization_version, client_hazelcast_version, client_name, labels): +def encode_request( + cluster_name, + username, + password, + uuid, + client_type, + serialization_version, + client_hazelcast_version, + client_name, + labels, +): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) FixSizedTypesCodec.encode_uuid(buf, _REQUEST_UUID_OFFSET, uuid) - FixSizedTypesCodec.encode_byte(buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version) + FixSizedTypesCodec.encode_byte( + buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version + ) StringCodec.encode(buf, cluster_name) CodecUtil.encode_nullable(buf, username, StringCodec.encode) CodecUtil.encode_nullable(buf, password, StringCodec.encode) @@ -40,11 +57,21 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["status"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_STATUS_OFFSET) - response["member_uuid"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET) - response["serialization_version"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET) - response["partition_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET) - response["cluster_id"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET) - response["failover_supported"] = FixSizedTypesCodec.decode_boolean(initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET) + response["member_uuid"] = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET + ) + response["serialization_version"] = FixSizedTypesCodec.decode_byte( + initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET + ) + response["partition_count"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET + ) + response["cluster_id"] = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET + ) + response["failover_supported"] = FixSizedTypesCodec.decode_boolean( + initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET + ) response["address"] = CodecUtil.decode_nullable(msg, AddressCodec.decode) response["server_hazelcast_version"] = StringCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/client_authentication_custom_codec.py b/hazelcast/protocol/codec/client_authentication_custom_codec.py index 0332a1cb41..0ac1caa870 100644 --- a/hazelcast/protocol/codec/client_authentication_custom_codec.py +++ b/hazelcast/protocol/codec/client_authentication_custom_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ByteArrayCodec from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -23,10 +28,21 @@ _RESPONSE_FAILOVER_SUPPORTED_OFFSET = _RESPONSE_CLUSTER_ID_OFFSET + UUID_SIZE_IN_BYTES -def encode_request(cluster_name, credentials, uuid, client_type, serialization_version, client_hazelcast_version, client_name, labels): +def encode_request( + cluster_name, + credentials, + uuid, + client_type, + serialization_version, + client_hazelcast_version, + client_name, + labels, +): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) FixSizedTypesCodec.encode_uuid(buf, _REQUEST_UUID_OFFSET, uuid) - FixSizedTypesCodec.encode_byte(buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version) + FixSizedTypesCodec.encode_byte( + buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version + ) StringCodec.encode(buf, cluster_name) ByteArrayCodec.encode(buf, credentials) StringCodec.encode(buf, client_type) @@ -40,11 +56,21 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["status"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_STATUS_OFFSET) - response["member_uuid"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET) - response["serialization_version"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET) - response["partition_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET) - response["cluster_id"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET) - response["failover_supported"] = FixSizedTypesCodec.decode_boolean(initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET) + response["member_uuid"] = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET + ) + response["serialization_version"] = FixSizedTypesCodec.decode_byte( + initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET + ) + response["partition_count"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET + ) + response["cluster_id"] = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET + ) + response["failover_supported"] = FixSizedTypesCodec.decode_boolean( + initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET + ) response["address"] = CodecUtil.decode_nullable(msg, AddressCodec.decode) response["server_hazelcast_version"] = StringCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/client_create_proxies_codec.py b/hazelcast/protocol/codec/client_create_proxies_codec.py index 159c9a29bc..e97b0f79d3 100644 --- a/hazelcast/protocol/codec/client_create_proxies_codec.py +++ b/hazelcast/protocol/codec/client_create_proxies_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/client_create_proxy_codec.py b/hazelcast/protocol/codec/client_create_proxy_codec.py index c42a50cfbc..364a5f9b4d 100644 --- a/hazelcast/protocol/codec/client_create_proxy_codec.py +++ b/hazelcast/protocol/codec/client_create_proxy_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x000400 diff --git a/hazelcast/protocol/codec/client_destroy_proxy_codec.py b/hazelcast/protocol/codec/client_destroy_proxy_codec.py index 0411a6d9b1..b8bb4acf63 100644 --- a/hazelcast/protocol/codec/client_destroy_proxy_codec.py +++ b/hazelcast/protocol/codec/client_destroy_proxy_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x000500 diff --git a/hazelcast/protocol/codec/client_get_distributed_objects_codec.py b/hazelcast/protocol/codec/client_get_distributed_objects_codec.py index 53372171c9..c225b807b0 100644 --- a/hazelcast/protocol/codec/client_get_distributed_objects_codec.py +++ b/hazelcast/protocol/codec/client_get_distributed_objects_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.codec.custom.distributed_object_info_codec import DistributedObjectInfoCodec diff --git a/hazelcast/protocol/codec/client_local_backup_listener_codec.py b/hazelcast/protocol/codec/client_local_backup_listener_codec.py index 1b0abe66cb..87192c772d 100644 --- a/hazelcast/protocol/codec/client_local_backup_listener_codec.py +++ b/hazelcast/protocol/codec/client_local_backup_listener_codec.py @@ -1,5 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) # hex: 0x000F00 _REQUEST_MESSAGE_TYPE = 3840 @@ -27,6 +33,8 @@ def handle(msg, handle_backup_event=None): message_type = msg.get_message_type() if message_type == _EVENT_BACKUP_MESSAGE_TYPE and handle_backup_event is not None: initial_frame = msg.next_frame() - source_invocation_correlation_id = FixSizedTypesCodec.decode_long(initial_frame.buf, _EVENT_BACKUP_SOURCE_INVOCATION_CORRELATION_ID_OFFSET) + source_invocation_correlation_id = FixSizedTypesCodec.decode_long( + initial_frame.buf, _EVENT_BACKUP_SOURCE_INVOCATION_CORRELATION_ID_OFFSET + ) handle_backup_event(source_invocation_correlation_id) return diff --git a/hazelcast/protocol/codec/client_ping_codec.py b/hazelcast/protocol/codec/client_ping_codec.py index ec596d4e58..caef0d6d59 100644 --- a/hazelcast/protocol/codec/client_ping_codec.py +++ b/hazelcast/protocol/codec/client_ping_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) # hex: 0x000B00 _REQUEST_MESSAGE_TYPE = 2816 diff --git a/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py b/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py index ec60c3cb30..8c4bf67b04 100644 --- a/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py +++ b/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) # hex: 0x000A00 _REQUEST_MESSAGE_TYPE = 2560 diff --git a/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py b/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py index 4a783d24d4..1c4ef72b19 100644 --- a/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) # hex: 0x000700 _REQUEST_MESSAGE_TYPE = 1792 diff --git a/hazelcast/protocol/codec/client_statistics_codec.py b/hazelcast/protocol/codec/client_statistics_codec.py index 0f39fc4a5e..86c8563b41 100644 --- a/hazelcast/protocol/codec/client_statistics_codec.py +++ b/hazelcast/protocol/codec/client_statistics_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ByteArrayCodec diff --git a/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py b/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py index 629ad67f67..f048c95068 100644 --- a/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py +++ b/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) # hex: 0x001000 _REQUEST_MESSAGE_TYPE = 4096 diff --git a/hazelcast/protocol/codec/count_down_latch_await_codec.py b/hazelcast/protocol/codec/count_down_latch_await_codec.py index 756a6183ae..0962a0e5f2 100644 --- a/hazelcast/protocol/codec/count_down_latch_await_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_await_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_count_down_codec.py b/hazelcast/protocol/codec/count_down_latch_count_down_codec.py index 0aef6a905d..009611d552 100644 --- a/hazelcast/protocol/codec/count_down_latch_count_down_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_count_down_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_get_count_codec.py b/hazelcast/protocol/codec/count_down_latch_get_count_codec.py index 35452273f3..298661365b 100644 --- a/hazelcast/protocol/codec/count_down_latch_get_count_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_get_count_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_get_round_codec.py b/hazelcast/protocol/codec/count_down_latch_get_round_codec.py index df7f0a5559..1c6869fa3e 100644 --- a/hazelcast/protocol/codec/count_down_latch_get_round_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_get_round_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py b/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py index bcbc2ae351..1e340394ad 100644 --- a/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py b/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py index fde33f98c5..c83f4d2957 100644 --- a/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py +++ b/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec diff --git a/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py b/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py index d166c0e5b1..bba9845006 100644 --- a/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py +++ b/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/cp_session_close_session_codec.py b/hazelcast/protocol/codec/cp_session_close_session_codec.py index 37ed4a11fd..c15074ca9f 100644 --- a/hazelcast/protocol/codec/cp_session_close_session_codec.py +++ b/hazelcast/protocol/codec/cp_session_close_session_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec # hex: 0x1F0200 diff --git a/hazelcast/protocol/codec/cp_session_create_session_codec.py b/hazelcast/protocol/codec/cp_session_create_session_codec.py index 829d9bb0b1..bc2cba9413 100644 --- a/hazelcast/protocol/codec/cp_session_create_session_codec.py +++ b/hazelcast/protocol/codec/cp_session_create_session_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec @@ -25,7 +30,13 @@ def encode_request(group_id, endpoint_name): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["session_id"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET) - response["ttl_millis"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_TTL_MILLIS_OFFSET) - response["heartbeat_millis"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_HEARTBEAT_MILLIS_OFFSET) + response["session_id"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET + ) + response["ttl_millis"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_TTL_MILLIS_OFFSET + ) + response["heartbeat_millis"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_HEARTBEAT_MILLIS_OFFSET + ) return response diff --git a/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py b/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py index 3afc3f9f02..f605d64eb7 100644 --- a/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py +++ b/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec # hex: 0x1F0400 diff --git a/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py b/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py index 4e29060584..47347cd48f 100644 --- a/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py +++ b/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec # hex: 0x1F0300 diff --git a/hazelcast/protocol/codec/custom/address_codec.py b/hazelcast/protocol/codec/custom/address_codec.py index b7e2710bf1..dfbde89852 100644 --- a/hazelcast/protocol/codec/custom/address_codec.py +++ b/hazelcast/protocol/codec/custom/address_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.core import Address from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py b/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py index da926daaab..a2d2930204 100644 --- a/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py +++ b/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py @@ -11,7 +11,9 @@ class AnchorDataListHolderCodec(object): def encode(buf, anchor_data_list_holder, is_final=False): buf.extend(BEGIN_FRAME_BUF) ListIntegerCodec.encode(buf, anchor_data_list_holder.anchor_page_list) - EntryListCodec.encode(buf, anchor_data_list_holder.anchor_data_list, DataCodec.encode, DataCodec.encode) + EntryListCodec.encode( + buf, anchor_data_list_holder.anchor_data_list, DataCodec.encode, DataCodec.encode + ) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: diff --git a/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py b/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py index d356553d6b..ddcfdf32f7 100644 --- a/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py +++ b/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py @@ -1,19 +1,32 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.config import BitmapIndexOptions from hazelcast.protocol.builtin import StringCodec _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS _UNIQUE_KEY_TRANSFORMATION_DECODE_OFFSET = 0 -_INITIAL_FRAME_SIZE = _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +_INITIAL_FRAME_SIZE = ( + _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET + + INT_SIZE_IN_BYTES + - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +) class BitmapIndexOptionsCodec(object): @staticmethod def encode(buf, bitmap_index_options, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int(initial_frame_buf, _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET, bitmap_index_options.unique_key_transformation) + FixSizedTypesCodec.encode_int( + initial_frame_buf, + _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET, + bitmap_index_options.unique_key_transformation, + ) buf.extend(initial_frame_buf) StringCodec.encode(buf, bitmap_index_options.unique_key) if is_final: @@ -25,7 +38,9 @@ def encode(buf, bitmap_index_options, is_final=False): def decode(msg): msg.next_frame() initial_frame = msg.next_frame() - unique_key_transformation = FixSizedTypesCodec.decode_int(initial_frame.buf, _UNIQUE_KEY_TRANSFORMATION_DECODE_OFFSET) + unique_key_transformation = FixSizedTypesCodec.decode_int( + initial_frame.buf, _UNIQUE_KEY_TRANSFORMATION_DECODE_OFFSET + ) unique_key = StringCodec.decode(msg) CodecUtil.fast_forward_to_end_frame(msg) return BitmapIndexOptions(unique_key, unique_key_transformation) diff --git a/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py b/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py index 591385da9d..63b08d828e 100644 --- a/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py +++ b/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.protocol import EndpointQualifier from hazelcast.protocol.builtin import StringCodec @@ -13,7 +18,9 @@ class EndpointQualifierCodec(object): @staticmethod def encode(buf, endpoint_qualifier, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int(initial_frame_buf, _TYPE_ENCODE_OFFSET, endpoint_qualifier.type) + FixSizedTypesCodec.encode_int( + initial_frame_buf, _TYPE_ENCODE_OFFSET, endpoint_qualifier.type + ) buf.extend(initial_frame_buf) CodecUtil.encode_nullable(buf, endpoint_qualifier.identifier, StringCodec.encode) if is_final: diff --git a/hazelcast/protocol/codec/custom/error_holder_codec.py b/hazelcast/protocol/codec/custom/error_holder_codec.py index c3aeefd410..ab20bf7fa7 100644 --- a/hazelcast/protocol/codec/custom/error_holder_codec.py +++ b/hazelcast/protocol/codec/custom/error_holder_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.protocol import ErrorHolder from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -8,18 +13,24 @@ _ERROR_CODE_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS _ERROR_CODE_DECODE_OFFSET = 0 -_INITIAL_FRAME_SIZE = _ERROR_CODE_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +_INITIAL_FRAME_SIZE = ( + _ERROR_CODE_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +) class ErrorHolderCodec(object): @staticmethod def encode(buf, error_holder, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int(initial_frame_buf, _ERROR_CODE_ENCODE_OFFSET, error_holder.error_code) + FixSizedTypesCodec.encode_int( + initial_frame_buf, _ERROR_CODE_ENCODE_OFFSET, error_holder.error_code + ) buf.extend(initial_frame_buf) StringCodec.encode(buf, error_holder.class_name) CodecUtil.encode_nullable(buf, error_holder.message, StringCodec.encode) - ListMultiFrameCodec.encode(buf, error_holder.stack_trace_elements, StackTraceElementCodec.encode) + ListMultiFrameCodec.encode( + buf, error_holder.stack_trace_elements, StackTraceElementCodec.encode + ) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: diff --git a/hazelcast/protocol/codec/custom/index_config_codec.py b/hazelcast/protocol/codec/custom/index_config_codec.py index fe4d9cdff4..74f5745d01 100644 --- a/hazelcast/protocol/codec/custom/index_config_codec.py +++ b/hazelcast/protocol/codec/custom/index_config_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.config import IndexConfig from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -19,7 +24,9 @@ def encode(buf, index_config, is_final=False): buf.extend(initial_frame_buf) CodecUtil.encode_nullable(buf, index_config.name, StringCodec.encode) ListMultiFrameCodec.encode(buf, index_config.attributes, StringCodec.encode) - CodecUtil.encode_nullable(buf, index_config.bitmap_index_options, BitmapIndexOptionsCodec.encode) + CodecUtil.encode_nullable( + buf, index_config.bitmap_index_options, BitmapIndexOptionsCodec.encode + ) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: diff --git a/hazelcast/protocol/codec/custom/member_info_codec.py b/hazelcast/protocol/codec/custom/member_info_codec.py index 3777ef5ead..1db53a802a 100644 --- a/hazelcast/protocol/codec/custom/member_info_codec.py +++ b/hazelcast/protocol/codec/custom/member_info_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.core import MemberInfo from hazelcast.protocol.codec.custom.address_codec import AddressCodec from hazelcast.protocol.builtin import MapCodec @@ -12,7 +17,9 @@ _UUID_DECODE_OFFSET = 0 _LITE_MEMBER_ENCODE_OFFSET = _UUID_ENCODE_OFFSET + UUID_SIZE_IN_BYTES _LITE_MEMBER_DECODE_OFFSET = _UUID_DECODE_OFFSET + UUID_SIZE_IN_BYTES -_INITIAL_FRAME_SIZE = _LITE_MEMBER_ENCODE_OFFSET + BOOLEAN_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +_INITIAL_FRAME_SIZE = ( + _LITE_MEMBER_ENCODE_OFFSET + BOOLEAN_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +) class MemberInfoCodec(object): @@ -20,12 +27,16 @@ class MemberInfoCodec(object): def encode(buf, member_info, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) FixSizedTypesCodec.encode_uuid(initial_frame_buf, _UUID_ENCODE_OFFSET, member_info.uuid) - FixSizedTypesCodec.encode_boolean(initial_frame_buf, _LITE_MEMBER_ENCODE_OFFSET, member_info.lite_member) + FixSizedTypesCodec.encode_boolean( + initial_frame_buf, _LITE_MEMBER_ENCODE_OFFSET, member_info.lite_member + ) buf.extend(initial_frame_buf) AddressCodec.encode(buf, member_info.address) MapCodec.encode(buf, member_info.attributes, StringCodec.encode, StringCodec.encode) MemberVersionCodec.encode(buf, member_info.version) - MapCodec.encode(buf, member_info.address_map, EndpointQualifierCodec.encode, AddressCodec.encode) + MapCodec.encode( + buf, member_info.address_map, EndpointQualifierCodec.encode, AddressCodec.encode + ) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: @@ -36,7 +47,9 @@ def decode(msg): msg.next_frame() initial_frame = msg.next_frame() uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _UUID_DECODE_OFFSET) - lite_member = FixSizedTypesCodec.decode_boolean(initial_frame.buf, _LITE_MEMBER_DECODE_OFFSET) + lite_member = FixSizedTypesCodec.decode_boolean( + initial_frame.buf, _LITE_MEMBER_DECODE_OFFSET + ) address = AddressCodec.decode(msg) attributes = MapCodec.decode(msg, StringCodec.decode, StringCodec.decode) version = MemberVersionCodec.decode(msg) @@ -46,4 +59,6 @@ def decode(msg): address_map = MapCodec.decode(msg, EndpointQualifierCodec.decode, AddressCodec.decode) is_address_map_exists = True CodecUtil.fast_forward_to_end_frame(msg) - return MemberInfo(address, uuid, attributes, lite_member, version, is_address_map_exists, address_map) + return MemberInfo( + address, uuid, attributes, lite_member, version, is_address_map_exists, address_map + ) diff --git a/hazelcast/protocol/codec/custom/member_version_codec.py b/hazelcast/protocol/codec/custom/member_version_codec.py index 6f45ca6f22..b2795e82cc 100644 --- a/hazelcast/protocol/codec/custom/member_version_codec.py +++ b/hazelcast/protocol/codec/custom/member_version_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.core import MemberVersion _MAJOR_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS @@ -16,9 +21,15 @@ class MemberVersionCodec(object): @staticmethod def encode(buf, member_version, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_byte(initial_frame_buf, _MAJOR_ENCODE_OFFSET, member_version.major) - FixSizedTypesCodec.encode_byte(initial_frame_buf, _MINOR_ENCODE_OFFSET, member_version.minor) - FixSizedTypesCodec.encode_byte(initial_frame_buf, _PATCH_ENCODE_OFFSET, member_version.patch) + FixSizedTypesCodec.encode_byte( + initial_frame_buf, _MAJOR_ENCODE_OFFSET, member_version.major + ) + FixSizedTypesCodec.encode_byte( + initial_frame_buf, _MINOR_ENCODE_OFFSET, member_version.minor + ) + FixSizedTypesCodec.encode_byte( + initial_frame_buf, _PATCH_ENCODE_OFFSET, member_version.patch + ) buf.extend(initial_frame_buf) if is_final: buf.extend(END_FINAL_FRAME_BUF) diff --git a/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py b/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py index bfa4eae46e..302a5e8b0e 100644 --- a/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py +++ b/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.protocol import PagingPredicateHolder from hazelcast.protocol.codec.custom.anchor_data_list_holder_codec import AnchorDataListHolderCodec from hazelcast.protocol.builtin import DataCodec @@ -11,16 +16,26 @@ _PAGE_DECODE_OFFSET = _PAGE_SIZE_DECODE_OFFSET + INT_SIZE_IN_BYTES _ITERATION_TYPE_ID_ENCODE_OFFSET = _PAGE_ENCODE_OFFSET + INT_SIZE_IN_BYTES _ITERATION_TYPE_ID_DECODE_OFFSET = _PAGE_DECODE_OFFSET + INT_SIZE_IN_BYTES -_INITIAL_FRAME_SIZE = _ITERATION_TYPE_ID_ENCODE_OFFSET + BYTE_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +_INITIAL_FRAME_SIZE = ( + _ITERATION_TYPE_ID_ENCODE_OFFSET + BYTE_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +) class PagingPredicateHolderCodec(object): @staticmethod def encode(buf, paging_predicate_holder, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int(initial_frame_buf, _PAGE_SIZE_ENCODE_OFFSET, paging_predicate_holder.page_size) - FixSizedTypesCodec.encode_int(initial_frame_buf, _PAGE_ENCODE_OFFSET, paging_predicate_holder.page) - FixSizedTypesCodec.encode_byte(initial_frame_buf, _ITERATION_TYPE_ID_ENCODE_OFFSET, paging_predicate_holder.iteration_type_id) + FixSizedTypesCodec.encode_int( + initial_frame_buf, _PAGE_SIZE_ENCODE_OFFSET, paging_predicate_holder.page_size + ) + FixSizedTypesCodec.encode_int( + initial_frame_buf, _PAGE_ENCODE_OFFSET, paging_predicate_holder.page + ) + FixSizedTypesCodec.encode_byte( + initial_frame_buf, + _ITERATION_TYPE_ID_ENCODE_OFFSET, + paging_predicate_holder.iteration_type_id, + ) buf.extend(initial_frame_buf) AnchorDataListHolderCodec.encode(buf, paging_predicate_holder.anchor_data_list_holder) CodecUtil.encode_nullable(buf, paging_predicate_holder.predicate_data, DataCodec.encode) @@ -37,10 +52,20 @@ def decode(msg): initial_frame = msg.next_frame() page_size = FixSizedTypesCodec.decode_int(initial_frame.buf, _PAGE_SIZE_DECODE_OFFSET) page = FixSizedTypesCodec.decode_int(initial_frame.buf, _PAGE_DECODE_OFFSET) - iteration_type_id = FixSizedTypesCodec.decode_byte(initial_frame.buf, _ITERATION_TYPE_ID_DECODE_OFFSET) + iteration_type_id = FixSizedTypesCodec.decode_byte( + initial_frame.buf, _ITERATION_TYPE_ID_DECODE_OFFSET + ) anchor_data_list_holder = AnchorDataListHolderCodec.decode(msg) predicate_data = CodecUtil.decode_nullable(msg, DataCodec.decode) comparator_data = CodecUtil.decode_nullable(msg, DataCodec.decode) partition_key_data = CodecUtil.decode_nullable(msg, DataCodec.decode) CodecUtil.fast_forward_to_end_frame(msg) - return PagingPredicateHolder(anchor_data_list_holder, predicate_data, comparator_data, page_size, page, iteration_type_id, partition_key_data) + return PagingPredicateHolder( + anchor_data_list_holder, + predicate_data, + comparator_data, + page_size, + page, + iteration_type_id, + partition_key_data, + ) diff --git a/hazelcast/protocol/codec/custom/raft_group_id_codec.py b/hazelcast/protocol/codec/custom/raft_group_id_codec.py index 760129d0fb..a9d5cc058b 100644 --- a/hazelcast/protocol/codec/custom/raft_group_id_codec.py +++ b/hazelcast/protocol/codec/custom/raft_group_id_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.protocol import RaftGroupId from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/custom/simple_entry_view_codec.py b/hazelcast/protocol/codec/custom/simple_entry_view_codec.py index 8174330941..6648fadd59 100644 --- a/hazelcast/protocol/codec/custom/simple_entry_view_codec.py +++ b/hazelcast/protocol/codec/custom/simple_entry_view_codec.py @@ -1,6 +1,11 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.core import SimpleEntryView from hazelcast.protocol.builtin import DataCodec @@ -24,23 +29,43 @@ _TTL_DECODE_OFFSET = _VERSION_DECODE_OFFSET + LONG_SIZE_IN_BYTES _MAX_IDLE_ENCODE_OFFSET = _TTL_ENCODE_OFFSET + LONG_SIZE_IN_BYTES _MAX_IDLE_DECODE_OFFSET = _TTL_DECODE_OFFSET + LONG_SIZE_IN_BYTES -_INITIAL_FRAME_SIZE = _MAX_IDLE_ENCODE_OFFSET + LONG_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +_INITIAL_FRAME_SIZE = ( + _MAX_IDLE_ENCODE_OFFSET + LONG_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +) class SimpleEntryViewCodec(object): @staticmethod def encode(buf, simple_entry_view, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_long(initial_frame_buf, _COST_ENCODE_OFFSET, simple_entry_view.cost) - FixSizedTypesCodec.encode_long(initial_frame_buf, _CREATION_TIME_ENCODE_OFFSET, simple_entry_view.creation_time) - FixSizedTypesCodec.encode_long(initial_frame_buf, _EXPIRATION_TIME_ENCODE_OFFSET, simple_entry_view.expiration_time) - FixSizedTypesCodec.encode_long(initial_frame_buf, _HITS_ENCODE_OFFSET, simple_entry_view.hits) - FixSizedTypesCodec.encode_long(initial_frame_buf, _LAST_ACCESS_TIME_ENCODE_OFFSET, simple_entry_view.last_access_time) - FixSizedTypesCodec.encode_long(initial_frame_buf, _LAST_STORED_TIME_ENCODE_OFFSET, simple_entry_view.last_stored_time) - FixSizedTypesCodec.encode_long(initial_frame_buf, _LAST_UPDATE_TIME_ENCODE_OFFSET, simple_entry_view.last_update_time) - FixSizedTypesCodec.encode_long(initial_frame_buf, _VERSION_ENCODE_OFFSET, simple_entry_view.version) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _COST_ENCODE_OFFSET, simple_entry_view.cost + ) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _CREATION_TIME_ENCODE_OFFSET, simple_entry_view.creation_time + ) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _EXPIRATION_TIME_ENCODE_OFFSET, simple_entry_view.expiration_time + ) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _HITS_ENCODE_OFFSET, simple_entry_view.hits + ) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _LAST_ACCESS_TIME_ENCODE_OFFSET, simple_entry_view.last_access_time + ) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _LAST_STORED_TIME_ENCODE_OFFSET, simple_entry_view.last_stored_time + ) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _LAST_UPDATE_TIME_ENCODE_OFFSET, simple_entry_view.last_update_time + ) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _VERSION_ENCODE_OFFSET, simple_entry_view.version + ) FixSizedTypesCodec.encode_long(initial_frame_buf, _TTL_ENCODE_OFFSET, simple_entry_view.ttl) - FixSizedTypesCodec.encode_long(initial_frame_buf, _MAX_IDLE_ENCODE_OFFSET, simple_entry_view.max_idle) + FixSizedTypesCodec.encode_long( + initial_frame_buf, _MAX_IDLE_ENCODE_OFFSET, simple_entry_view.max_idle + ) buf.extend(initial_frame_buf) DataCodec.encode(buf, simple_entry_view.key) DataCodec.encode(buf, simple_entry_view.value) @@ -54,16 +79,39 @@ def decode(msg): msg.next_frame() initial_frame = msg.next_frame() cost = FixSizedTypesCodec.decode_long(initial_frame.buf, _COST_DECODE_OFFSET) - creation_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _CREATION_TIME_DECODE_OFFSET) - expiration_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _EXPIRATION_TIME_DECODE_OFFSET) + creation_time = FixSizedTypesCodec.decode_long( + initial_frame.buf, _CREATION_TIME_DECODE_OFFSET + ) + expiration_time = FixSizedTypesCodec.decode_long( + initial_frame.buf, _EXPIRATION_TIME_DECODE_OFFSET + ) hits = FixSizedTypesCodec.decode_long(initial_frame.buf, _HITS_DECODE_OFFSET) - last_access_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _LAST_ACCESS_TIME_DECODE_OFFSET) - last_stored_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _LAST_STORED_TIME_DECODE_OFFSET) - last_update_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _LAST_UPDATE_TIME_DECODE_OFFSET) + last_access_time = FixSizedTypesCodec.decode_long( + initial_frame.buf, _LAST_ACCESS_TIME_DECODE_OFFSET + ) + last_stored_time = FixSizedTypesCodec.decode_long( + initial_frame.buf, _LAST_STORED_TIME_DECODE_OFFSET + ) + last_update_time = FixSizedTypesCodec.decode_long( + initial_frame.buf, _LAST_UPDATE_TIME_DECODE_OFFSET + ) version = FixSizedTypesCodec.decode_long(initial_frame.buf, _VERSION_DECODE_OFFSET) ttl = FixSizedTypesCodec.decode_long(initial_frame.buf, _TTL_DECODE_OFFSET) max_idle = FixSizedTypesCodec.decode_long(initial_frame.buf, _MAX_IDLE_DECODE_OFFSET) key = DataCodec.decode(msg) value = DataCodec.decode(msg) CodecUtil.fast_forward_to_end_frame(msg) - return SimpleEntryView(key, value, cost, creation_time, expiration_time, hits, last_access_time, last_stored_time, last_update_time, version, ttl, max_idle) + return SimpleEntryView( + key, + value, + cost, + creation_time, + expiration_time, + hits, + last_access_time, + last_stored_time, + last_update_time, + version, + ttl, + max_idle, + ) diff --git a/hazelcast/protocol/codec/custom/stack_trace_element_codec.py b/hazelcast/protocol/codec/custom/stack_trace_element_codec.py index fd72863637..3156a37f3f 100644 --- a/hazelcast/protocol/codec/custom/stack_trace_element_codec.py +++ b/hazelcast/protocol/codec/custom/stack_trace_element_codec.py @@ -1,19 +1,28 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom +from hazelcast.protocol.client_message import ( + END_FRAME_BUF, + END_FINAL_FRAME_BUF, + SIZE_OF_FRAME_LENGTH_AND_FLAGS, + create_initial_buffer_custom, +) from hazelcast.protocol import StackTraceElement from hazelcast.protocol.builtin import StringCodec _LINE_NUMBER_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS _LINE_NUMBER_DECODE_OFFSET = 0 -_INITIAL_FRAME_SIZE = _LINE_NUMBER_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +_INITIAL_FRAME_SIZE = ( + _LINE_NUMBER_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS +) class StackTraceElementCodec(object): @staticmethod def encode(buf, stack_trace_element, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int(initial_frame_buf, _LINE_NUMBER_ENCODE_OFFSET, stack_trace_element.line_number) + FixSizedTypesCodec.encode_int( + initial_frame_buf, _LINE_NUMBER_ENCODE_OFFSET, stack_trace_element.line_number + ) buf.extend(initial_frame_buf) StringCodec.encode(buf, stack_trace_element.class_name) StringCodec.encode(buf, stack_trace_element.method_name) diff --git a/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py b/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py index b51bc15cfc..22ccf51a74 100644 --- a/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py +++ b/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) # hex: 0x080400 _REQUEST_MESSAGE_TYPE = 525312 diff --git a/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py b/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py index db8c43daa6..6d93161fd4 100644 --- a/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py +++ b/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) # hex: 0x080300 _REQUEST_MESSAGE_TYPE = 525056 diff --git a/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py b/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py index 49220ede8c..b6452f1970 100644 --- a/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py +++ b/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x080200 diff --git a/hazelcast/protocol/codec/executor_service_shutdown_codec.py b/hazelcast/protocol/codec/executor_service_shutdown_codec.py index 1e3b4c7ca9..431caf7adc 100644 --- a/hazelcast/protocol/codec/executor_service_shutdown_codec.py +++ b/hazelcast/protocol/codec/executor_service_shutdown_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x080100 diff --git a/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py b/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py index 4064bbf119..30bff7f88b 100644 --- a/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py +++ b/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py b/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py index 6fa1475c6d..b2ac0b4f54 100644 --- a/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py +++ b/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py b/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py index 9a979d098d..36a45fb9cb 100644 --- a/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec @@ -27,7 +32,13 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["fence"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_FENCE_OFFSET) - response["lock_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_LOCK_COUNT_OFFSET) - response["session_id"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET) - response["thread_id"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_THREAD_ID_OFFSET) + response["lock_count"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_LOCK_COUNT_OFFSET + ) + response["session_id"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET + ) + response["thread_id"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_THREAD_ID_OFFSET + ) return response diff --git a/hazelcast/protocol/codec/fenced_lock_lock_codec.py b/hazelcast/protocol/codec/fenced_lock_lock_codec.py index bdb1f6137e..a847f6a2e2 100644 --- a/hazelcast/protocol/codec/fenced_lock_lock_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_lock_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py b/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py index 39442503c1..0dc0738f35 100644 --- a/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/fenced_lock_unlock_codec.py b/hazelcast/protocol/codec/fenced_lock_unlock_codec.py index 68215547ee..6c774be516 100644 --- a/hazelcast/protocol/codec/fenced_lock_unlock_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_unlock_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py b/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py index bfef30ecce..847df27146 100644 --- a/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py +++ b/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x1C0100 @@ -26,6 +31,10 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["base"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_BASE_OFFSET) - response["increment"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_INCREMENT_OFFSET) - response["batch_size"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_BATCH_SIZE_OFFSET) + response["increment"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_INCREMENT_OFFSET + ) + response["batch_size"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_BATCH_SIZE_OFFSET + ) return response diff --git a/hazelcast/protocol/codec/list_add_all_codec.py b/hazelcast/protocol/codec/list_add_all_codec.py index 3d4615f2d8..92c4598071 100644 --- a/hazelcast/protocol/codec/list_add_all_codec.py +++ b/hazelcast/protocol/codec/list_add_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_add_all_with_index_codec.py b/hazelcast/protocol/codec/list_add_all_with_index_codec.py index 50de235b13..d43f38deef 100644 --- a/hazelcast/protocol/codec/list_add_all_with_index_codec.py +++ b/hazelcast/protocol/codec/list_add_all_with_index_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_add_codec.py b/hazelcast/protocol/codec/list_add_codec.py index 00fcd85e95..241f867cc7 100644 --- a/hazelcast/protocol/codec/list_add_codec.py +++ b/hazelcast/protocol/codec/list_add_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_add_listener_codec.py b/hazelcast/protocol/codec/list_add_listener_codec.py index 7d4e4f489a..a4581f88f2 100644 --- a/hazelcast/protocol/codec/list_add_listener_codec.py +++ b/hazelcast/protocol/codec/list_add_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_add_with_index_codec.py b/hazelcast/protocol/codec/list_add_with_index_codec.py index 93a5bfd48b..e4ef84ad6c 100644 --- a/hazelcast/protocol/codec/list_add_with_index_codec.py +++ b/hazelcast/protocol/codec/list_add_with_index_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_clear_codec.py b/hazelcast/protocol/codec/list_clear_codec.py index a3d585ef44..a7ef42e32b 100644 --- a/hazelcast/protocol/codec/list_clear_codec.py +++ b/hazelcast/protocol/codec/list_clear_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x050900 diff --git a/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py b/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py index 4192a7b4e6..b7bc073a97 100644 --- a/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py +++ b/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py b/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py index 197ce06e3c..055a5d41e7 100644 --- a/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py +++ b/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_contains_all_codec.py b/hazelcast/protocol/codec/list_contains_all_codec.py index 8cb5745b40..11cc79b380 100644 --- a/hazelcast/protocol/codec/list_contains_all_codec.py +++ b/hazelcast/protocol/codec/list_contains_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_contains_codec.py b/hazelcast/protocol/codec/list_contains_codec.py index 703e120c48..ccb6fce809 100644 --- a/hazelcast/protocol/codec/list_contains_codec.py +++ b/hazelcast/protocol/codec/list_contains_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_get_all_codec.py b/hazelcast/protocol/codec/list_get_all_codec.py index b6da226ef2..d5cbd2609f 100644 --- a/hazelcast/protocol/codec/list_get_all_codec.py +++ b/hazelcast/protocol/codec/list_get_all_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_get_codec.py b/hazelcast/protocol/codec/list_get_codec.py index a3977ccb09..bd8eb40d78 100644 --- a/hazelcast/protocol/codec/list_get_codec.py +++ b/hazelcast/protocol/codec/list_get_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_index_of_codec.py b/hazelcast/protocol/codec/list_index_of_codec.py index f1cf60eb17..fc9ba0b286 100644 --- a/hazelcast/protocol/codec/list_index_of_codec.py +++ b/hazelcast/protocol/codec/list_index_of_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_is_empty_codec.py b/hazelcast/protocol/codec/list_is_empty_codec.py index 8c7e971604..8955ede1d4 100644 --- a/hazelcast/protocol/codec/list_is_empty_codec.py +++ b/hazelcast/protocol/codec/list_is_empty_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x050D00 diff --git a/hazelcast/protocol/codec/list_iterator_codec.py b/hazelcast/protocol/codec/list_iterator_codec.py index b3ad4c89ed..6b9eb23b6f 100644 --- a/hazelcast/protocol/codec/list_iterator_codec.py +++ b/hazelcast/protocol/codec/list_iterator_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_last_index_of_codec.py b/hazelcast/protocol/codec/list_last_index_of_codec.py index 8e400ed091..798975b5be 100644 --- a/hazelcast/protocol/codec/list_last_index_of_codec.py +++ b/hazelcast/protocol/codec/list_last_index_of_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_list_iterator_codec.py b/hazelcast/protocol/codec/list_list_iterator_codec.py index 877afc25ae..b7c51a8cfa 100644 --- a/hazelcast/protocol/codec/list_list_iterator_codec.py +++ b/hazelcast/protocol/codec/list_list_iterator_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_remove_codec.py b/hazelcast/protocol/codec/list_remove_codec.py index b141c55d25..ba90d35b5b 100644 --- a/hazelcast/protocol/codec/list_remove_codec.py +++ b/hazelcast/protocol/codec/list_remove_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_remove_listener_codec.py b/hazelcast/protocol/codec/list_remove_listener_codec.py index 15273f453f..3cebc923eb 100644 --- a/hazelcast/protocol/codec/list_remove_listener_codec.py +++ b/hazelcast/protocol/codec/list_remove_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x050C00 diff --git a/hazelcast/protocol/codec/list_remove_with_index_codec.py b/hazelcast/protocol/codec/list_remove_with_index_codec.py index 5e664b535b..9b2f9e4e26 100644 --- a/hazelcast/protocol/codec/list_remove_with_index_codec.py +++ b/hazelcast/protocol/codec/list_remove_with_index_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_set_codec.py b/hazelcast/protocol/codec/list_set_codec.py index 31cf007899..467962bfbe 100644 --- a/hazelcast/protocol/codec/list_set_codec.py +++ b/hazelcast/protocol/codec/list_set_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_size_codec.py b/hazelcast/protocol/codec/list_size_codec.py index 5a4cfbfdf3..091c5def74 100644 --- a/hazelcast/protocol/codec/list_size_codec.py +++ b/hazelcast/protocol/codec/list_size_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x050100 diff --git a/hazelcast/protocol/codec/list_sub_codec.py b/hazelcast/protocol/codec/list_sub_codec.py index a16957b1c3..e24170c016 100644 --- a/hazelcast/protocol/codec/list_sub_codec.py +++ b/hazelcast/protocol/codec/list_sub_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_add_entry_listener_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_codec.py index d14035cafd..a69404aec5 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -40,12 +46,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py index 91507bf516..f91dca8a24 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -41,12 +47,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py index 9716eb69cc..54b31cfa0c 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -42,12 +48,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py index 727ddaa3e8..307752b486 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -41,12 +47,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/map_add_index_codec.py b/hazelcast/protocol/codec/map_add_index_codec.py index 299df0cb2b..c1c08986d1 100644 --- a/hazelcast/protocol/codec/map_add_index_codec.py +++ b/hazelcast/protocol/codec/map_add_index_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.index_config_codec import IndexConfigCodec diff --git a/hazelcast/protocol/codec/map_add_interceptor_codec.py b/hazelcast/protocol/codec/map_add_interceptor_codec.py index f996ec0939..87ddda82ca 100644 --- a/hazelcast/protocol/codec/map_add_interceptor_codec.py +++ b/hazelcast/protocol/codec/map_add_interceptor_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py b/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py index 09c02ae5ed..1a1a599e2c 100644 --- a/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py +++ b/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -22,8 +28,12 @@ _REQUEST_INITIAL_FRAME_SIZE = _REQUEST_LOCAL_ONLY_OFFSET + BOOLEAN_SIZE_IN_BYTES _RESPONSE_RESPONSE_OFFSET = RESPONSE_HEADER_SIZE _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET = EVENT_HEADER_SIZE -_EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET = _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET + UUID_SIZE_IN_BYTES -_EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET = _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET + UUID_SIZE_IN_BYTES +_EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET = ( + _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET + UUID_SIZE_IN_BYTES +) +_EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET = ( + _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET + UUID_SIZE_IN_BYTES +) def encode_request(name, listener_flags, local_only): @@ -41,15 +51,27 @@ def decode_response(msg): def handle(msg, handle_i_map_invalidation_event=None, handle_i_map_batch_invalidation_event=None): message_type = msg.get_message_type() - if message_type == _EVENT_I_MAP_INVALIDATION_MESSAGE_TYPE and handle_i_map_invalidation_event is not None: + if ( + message_type == _EVENT_I_MAP_INVALIDATION_MESSAGE_TYPE + and handle_i_map_invalidation_event is not None + ): initial_frame = msg.next_frame() - source_uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET) - partition_uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET) - sequence = FixSizedTypesCodec.decode_long(initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET) + source_uuid = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET + ) + partition_uuid = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET + ) + sequence = FixSizedTypesCodec.decode_long( + initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) handle_i_map_invalidation_event(key, source_uuid, partition_uuid, sequence) return - if message_type == _EVENT_I_MAP_BATCH_INVALIDATION_MESSAGE_TYPE and handle_i_map_batch_invalidation_event is not None: + if ( + message_type == _EVENT_I_MAP_BATCH_INVALIDATION_MESSAGE_TYPE + and handle_i_map_batch_invalidation_event is not None + ): msg.next_frame() keys = ListMultiFrameCodec.decode(msg, DataCodec.decode) source_uuids = ListUUIDCodec.decode(msg) diff --git a/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py b/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py index d96f1f0b00..d444a7f9c8 100644 --- a/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x011B00 @@ -14,7 +20,9 @@ _REQUEST_INITIAL_FRAME_SIZE = _REQUEST_LOCAL_ONLY_OFFSET + BOOLEAN_SIZE_IN_BYTES _RESPONSE_RESPONSE_OFFSET = RESPONSE_HEADER_SIZE _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET = EVENT_HEADER_SIZE -_EVENT_MAP_PARTITION_LOST_UUID_OFFSET = _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES +_EVENT_MAP_PARTITION_LOST_UUID_OFFSET = ( + _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES +) def encode_request(name, local_only): @@ -31,9 +39,16 @@ def decode_response(msg): def handle(msg, handle_map_partition_lost_event=None): message_type = msg.get_message_type() - if message_type == _EVENT_MAP_PARTITION_LOST_MESSAGE_TYPE and handle_map_partition_lost_event is not None: + if ( + message_type == _EVENT_MAP_PARTITION_LOST_MESSAGE_TYPE + and handle_map_partition_lost_event is not None + ): initial_frame = msg.next_frame() - partition_id = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET) - uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_MAP_PARTITION_LOST_UUID_OFFSET) + partition_id = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET + ) + uuid = FixSizedTypesCodec.decode_uuid( + initial_frame.buf, _EVENT_MAP_PARTITION_LOST_UUID_OFFSET + ) handle_map_partition_lost_event(partition_id, uuid) return diff --git a/hazelcast/protocol/codec/map_aggregate_codec.py b/hazelcast/protocol/codec/map_aggregate_codec.py index 52c6273204..b533e55ec4 100644 --- a/hazelcast/protocol/codec/map_aggregate_codec.py +++ b/hazelcast/protocol/codec/map_aggregate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py b/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py index 1aff715f90..d909020362 100644 --- a/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_clear_codec.py b/hazelcast/protocol/codec/map_clear_codec.py index f7fbca6c21..74d00f8ba5 100644 --- a/hazelcast/protocol/codec/map_clear_codec.py +++ b/hazelcast/protocol/codec/map_clear_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x012D00 diff --git a/hazelcast/protocol/codec/map_contains_key_codec.py b/hazelcast/protocol/codec/map_contains_key_codec.py index 114afe1b63..112926d47e 100644 --- a/hazelcast/protocol/codec/map_contains_key_codec.py +++ b/hazelcast/protocol/codec/map_contains_key_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_contains_value_codec.py b/hazelcast/protocol/codec/map_contains_value_codec.py index 8f3053b5cc..ed87adc5a3 100644 --- a/hazelcast/protocol/codec/map_contains_value_codec.py +++ b/hazelcast/protocol/codec/map_contains_value_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_delete_codec.py b/hazelcast/protocol/codec/map_delete_codec.py index 78c7ec16e4..aea9870400 100644 --- a/hazelcast/protocol/codec/map_delete_codec.py +++ b/hazelcast/protocol/codec/map_delete_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py b/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py index 2cf3cf44d6..e84ea87c91 100644 --- a/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py +++ b/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.paging_predicate_holder_codec import PagingPredicateHolderCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_entries_with_predicate_codec.py b/hazelcast/protocol/codec/map_entries_with_predicate_codec.py index 5dd41fe868..cde703d7e5 100644 --- a/hazelcast/protocol/codec/map_entries_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_entries_with_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_entry_set_codec.py b/hazelcast/protocol/codec/map_entry_set_codec.py index 72e490e143..b1fc753a80 100644 --- a/hazelcast/protocol/codec/map_entry_set_codec.py +++ b/hazelcast/protocol/codec/map_entry_set_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_event_journal_read_codec.py b/hazelcast/protocol/codec/map_event_journal_read_codec.py index 55d3be0301..f0232bb8da 100644 --- a/hazelcast/protocol/codec/map_event_journal_read_codec.py +++ b/hazelcast/protocol/codec/map_event_journal_read_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -34,8 +39,12 @@ def encode_request(name, start_sequence, min_size, max_size, predicate, projecti def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["read_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET) - response["next_seq"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET) + response["read_count"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET + ) + response["next_seq"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET + ) response["items"] = ListMultiFrameCodec.decode(msg, DataCodec.decode) response["item_seqs"] = CodecUtil.decode_nullable(msg, LongArrayCodec.decode) return response diff --git a/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py b/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py index dc85d17e3a..957cf77d3d 100644 --- a/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py +++ b/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x014100 @@ -22,6 +27,10 @@ def encode_request(name): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["oldest_sequence"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_OLDEST_SEQUENCE_OFFSET) - response["newest_sequence"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_NEWEST_SEQUENCE_OFFSET) + response["oldest_sequence"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_OLDEST_SEQUENCE_OFFSET + ) + response["newest_sequence"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_NEWEST_SEQUENCE_OFFSET + ) return response diff --git a/hazelcast/protocol/codec/map_evict_all_codec.py b/hazelcast/protocol/codec/map_evict_all_codec.py index 4fae1d34bc..c2a26195a6 100644 --- a/hazelcast/protocol/codec/map_evict_all_codec.py +++ b/hazelcast/protocol/codec/map_evict_all_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x011F00 diff --git a/hazelcast/protocol/codec/map_evict_codec.py b/hazelcast/protocol/codec/map_evict_codec.py index 0e6f8a4af5..2d859f4056 100644 --- a/hazelcast/protocol/codec/map_evict_codec.py +++ b/hazelcast/protocol/codec/map_evict_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py b/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py index f2daf9e804..4f0ccf8c24 100644 --- a/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py +++ b/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_execute_on_key_codec.py b/hazelcast/protocol/codec/map_execute_on_key_codec.py index 6697a14b0f..79097350d9 100644 --- a/hazelcast/protocol/codec/map_execute_on_key_codec.py +++ b/hazelcast/protocol/codec/map_execute_on_key_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_execute_on_keys_codec.py b/hazelcast/protocol/codec/map_execute_on_keys_codec.py index e554558bb9..b3c862c867 100644 --- a/hazelcast/protocol/codec/map_execute_on_keys_codec.py +++ b/hazelcast/protocol/codec/map_execute_on_keys_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_execute_with_predicate_codec.py b/hazelcast/protocol/codec/map_execute_with_predicate_codec.py index 4a54302b58..bc8860cfdf 100644 --- a/hazelcast/protocol/codec/map_execute_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_execute_with_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_flush_codec.py b/hazelcast/protocol/codec/map_flush_codec.py index 3ab3e8fc3e..733a097538 100644 --- a/hazelcast/protocol/codec/map_flush_codec.py +++ b/hazelcast/protocol/codec/map_flush_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x010A00 diff --git a/hazelcast/protocol/codec/map_force_unlock_codec.py b/hazelcast/protocol/codec/map_force_unlock_codec.py index 9dd6410282..59ff066c55 100644 --- a/hazelcast/protocol/codec/map_force_unlock_codec.py +++ b/hazelcast/protocol/codec/map_force_unlock_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_get_all_codec.py b/hazelcast/protocol/codec/map_get_all_codec.py index 2758d7249d..1a608fb516 100644 --- a/hazelcast/protocol/codec/map_get_all_codec.py +++ b/hazelcast/protocol/codec/map_get_all_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_get_codec.py b/hazelcast/protocol/codec/map_get_codec.py index 37e3deae8d..d5d12df948 100644 --- a/hazelcast/protocol/codec/map_get_codec.py +++ b/hazelcast/protocol/codec/map_get_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_get_entry_view_codec.py b/hazelcast/protocol/codec/map_get_entry_view_codec.py index ef934460d9..8d6d912995 100644 --- a/hazelcast/protocol/codec/map_get_entry_view_codec.py +++ b/hazelcast/protocol/codec/map_get_entry_view_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.codec.custom.simple_entry_view_codec import SimpleEntryViewCodec @@ -27,6 +32,8 @@ def encode_request(name, key, thread_id): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["max_idle"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_MAX_IDLE_OFFSET) + response["max_idle"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_MAX_IDLE_OFFSET + ) response["response"] = CodecUtil.decode_nullable(msg, SimpleEntryViewCodec.decode) return response diff --git a/hazelcast/protocol/codec/map_is_empty_codec.py b/hazelcast/protocol/codec/map_is_empty_codec.py index 653003cd74..5d2eef80c8 100644 --- a/hazelcast/protocol/codec/map_is_empty_codec.py +++ b/hazelcast/protocol/codec/map_is_empty_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x012B00 diff --git a/hazelcast/protocol/codec/map_is_locked_codec.py b/hazelcast/protocol/codec/map_is_locked_codec.py index 8e7321ad7b..f5b4609888 100644 --- a/hazelcast/protocol/codec/map_is_locked_codec.py +++ b/hazelcast/protocol/codec/map_is_locked_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_key_set_codec.py b/hazelcast/protocol/codec/map_key_set_codec.py index e94247fa92..13fb5477b8 100644 --- a/hazelcast/protocol/codec/map_key_set_codec.py +++ b/hazelcast/protocol/codec/map_key_set_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py b/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py index e1e4e903a2..087edea3ec 100644 --- a/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py +++ b/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.paging_predicate_holder_codec import PagingPredicateHolderCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py b/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py index 5f69ea9025..5ac240fbdc 100644 --- a/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_load_all_codec.py b/hazelcast/protocol/codec/map_load_all_codec.py index b0879d6781..9932e14417 100644 --- a/hazelcast/protocol/codec/map_load_all_codec.py +++ b/hazelcast/protocol/codec/map_load_all_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x012000 @@ -14,6 +18,8 @@ def encode_request(name, replace_existing_values): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) - FixSizedTypesCodec.encode_boolean(buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values) + FixSizedTypesCodec.encode_boolean( + buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values + ) StringCodec.encode(buf, name, True) return OutboundMessage(buf, False) diff --git a/hazelcast/protocol/codec/map_load_given_keys_codec.py b/hazelcast/protocol/codec/map_load_given_keys_codec.py index 6d658ba877..daac9003c8 100644 --- a/hazelcast/protocol/codec/map_load_given_keys_codec.py +++ b/hazelcast/protocol/codec/map_load_given_keys_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec @@ -16,7 +20,9 @@ def encode_request(name, keys, replace_existing_values): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) - FixSizedTypesCodec.encode_boolean(buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values) + FixSizedTypesCodec.encode_boolean( + buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values + ) StringCodec.encode(buf, name) ListMultiFrameCodec.encode(buf, keys, DataCodec.encode, True) return OutboundMessage(buf, False) diff --git a/hazelcast/protocol/codec/map_lock_codec.py b/hazelcast/protocol/codec/map_lock_codec.py index 85583b0d6c..76eb9045c1 100644 --- a/hazelcast/protocol/codec/map_lock_codec.py +++ b/hazelcast/protocol/codec/map_lock_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_project_codec.py b/hazelcast/protocol/codec/map_project_codec.py index 1c5cfd4433..30a370c4dc 100644 --- a/hazelcast/protocol/codec/map_project_codec.py +++ b/hazelcast/protocol/codec/map_project_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_project_with_predicate_codec.py b/hazelcast/protocol/codec/map_project_with_predicate_codec.py index 9ba5200014..6d314fbd56 100644 --- a/hazelcast/protocol/codec/map_project_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_project_with_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_put_all_codec.py b/hazelcast/protocol/codec/map_put_all_codec.py index 9dfc8ae95d..d33af05524 100644 --- a/hazelcast/protocol/codec/map_put_all_codec.py +++ b/hazelcast/protocol/codec/map_put_all_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_put_codec.py b/hazelcast/protocol/codec/map_put_codec.py index fa6919ea55..083ab905d0 100644 --- a/hazelcast/protocol/codec/map_put_codec.py +++ b/hazelcast/protocol/codec/map_put_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_if_absent_codec.py b/hazelcast/protocol/codec/map_put_if_absent_codec.py index 6d9cd16d37..fba0b4b1b9 100644 --- a/hazelcast/protocol/codec/map_put_if_absent_codec.py +++ b/hazelcast/protocol/codec/map_put_if_absent_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py b/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py index 871e188525..5402837b61 100644 --- a/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_transient_codec.py b/hazelcast/protocol/codec/map_put_transient_codec.py index 035bad3db0..f28524442e 100644 --- a/hazelcast/protocol/codec/map_put_transient_codec.py +++ b/hazelcast/protocol/codec/map_put_transient_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py b/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py index f0a7dce75b..a015741016 100644 --- a/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_with_max_idle_codec.py b/hazelcast/protocol/codec/map_put_with_max_idle_codec.py index 83196ffafe..041d5991cc 100644 --- a/hazelcast/protocol/codec/map_put_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_put_with_max_idle_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_remove_all_codec.py b/hazelcast/protocol/codec/map_remove_all_codec.py index 2df01d2b07..12e0ae5217 100644 --- a/hazelcast/protocol/codec/map_remove_all_codec.py +++ b/hazelcast/protocol/codec/map_remove_all_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_remove_codec.py b/hazelcast/protocol/codec/map_remove_codec.py index 2001d5fa87..9a25fab1f9 100644 --- a/hazelcast/protocol/codec/map_remove_codec.py +++ b/hazelcast/protocol/codec/map_remove_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_remove_entry_listener_codec.py b/hazelcast/protocol/codec/map_remove_entry_listener_codec.py index d81b1ead95..cc2bf1376a 100644 --- a/hazelcast/protocol/codec/map_remove_entry_listener_codec.py +++ b/hazelcast/protocol/codec/map_remove_entry_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x011A00 diff --git a/hazelcast/protocol/codec/map_remove_if_same_codec.py b/hazelcast/protocol/codec/map_remove_if_same_codec.py index 8bace723da..5a4ae13e0c 100644 --- a/hazelcast/protocol/codec/map_remove_if_same_codec.py +++ b/hazelcast/protocol/codec/map_remove_if_same_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_remove_interceptor_codec.py b/hazelcast/protocol/codec/map_remove_interceptor_codec.py index 93d14e1c16..ddf011c943 100644 --- a/hazelcast/protocol/codec/map_remove_interceptor_codec.py +++ b/hazelcast/protocol/codec/map_remove_interceptor_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x011500 diff --git a/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py b/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py index e089b1dd63..e7c694ea70 100644 --- a/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x011C00 diff --git a/hazelcast/protocol/codec/map_replace_codec.py b/hazelcast/protocol/codec/map_replace_codec.py index 910857cf55..f116c3dd9c 100644 --- a/hazelcast/protocol/codec/map_replace_codec.py +++ b/hazelcast/protocol/codec/map_replace_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_replace_if_same_codec.py b/hazelcast/protocol/codec/map_replace_if_same_codec.py index 8f7f295121..f20ff4ba05 100644 --- a/hazelcast/protocol/codec/map_replace_if_same_codec.py +++ b/hazelcast/protocol/codec/map_replace_if_same_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_set_codec.py b/hazelcast/protocol/codec/map_set_codec.py index a7baffea49..d19526d221 100644 --- a/hazelcast/protocol/codec/map_set_codec.py +++ b/hazelcast/protocol/codec/map_set_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_set_ttl_codec.py b/hazelcast/protocol/codec/map_set_ttl_codec.py index ea27b26ce9..e9c4457b6f 100644 --- a/hazelcast/protocol/codec/map_set_ttl_codec.py +++ b/hazelcast/protocol/codec/map_set_ttl_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_set_with_max_idle_codec.py b/hazelcast/protocol/codec/map_set_with_max_idle_codec.py index 2afae0097a..88756dfb19 100644 --- a/hazelcast/protocol/codec/map_set_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_set_with_max_idle_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_size_codec.py b/hazelcast/protocol/codec/map_size_codec.py index b781a5afd1..1c6245359d 100644 --- a/hazelcast/protocol/codec/map_size_codec.py +++ b/hazelcast/protocol/codec/map_size_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x012A00 diff --git a/hazelcast/protocol/codec/map_submit_to_key_codec.py b/hazelcast/protocol/codec/map_submit_to_key_codec.py index 660d412968..6f985a9b16 100644 --- a/hazelcast/protocol/codec/map_submit_to_key_codec.py +++ b/hazelcast/protocol/codec/map_submit_to_key_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_try_lock_codec.py b/hazelcast/protocol/codec/map_try_lock_codec.py index c8684830b6..262966c42d 100644 --- a/hazelcast/protocol/codec/map_try_lock_codec.py +++ b/hazelcast/protocol/codec/map_try_lock_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_try_put_codec.py b/hazelcast/protocol/codec/map_try_put_codec.py index 0ff8680321..6da9111257 100644 --- a/hazelcast/protocol/codec/map_try_put_codec.py +++ b/hazelcast/protocol/codec/map_try_put_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_try_remove_codec.py b/hazelcast/protocol/codec/map_try_remove_codec.py index 8e456dedc1..413c611b63 100644 --- a/hazelcast/protocol/codec/map_try_remove_codec.py +++ b/hazelcast/protocol/codec/map_try_remove_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_unlock_codec.py b/hazelcast/protocol/codec/map_unlock_codec.py index 3b3568e8db..6b8ec89f77 100644 --- a/hazelcast/protocol/codec/map_unlock_codec.py +++ b/hazelcast/protocol/codec/map_unlock_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_values_codec.py b/hazelcast/protocol/codec/map_values_codec.py index a6548d12d7..2581688464 100644 --- a/hazelcast/protocol/codec/map_values_codec.py +++ b/hazelcast/protocol/codec/map_values_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py b/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py index 85da7e0b9b..01a7b020ef 100644 --- a/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py +++ b/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.paging_predicate_holder_codec import PagingPredicateHolderCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_values_with_predicate_codec.py b/hazelcast/protocol/codec/map_values_with_predicate_codec.py index b16dc1cc0d..0f3b5da231 100644 --- a/hazelcast/protocol/codec/map_values_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_values_with_predicate_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py b/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py index 87a5f53e9e..da933f87d1 100644 --- a/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py +++ b/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -38,12 +44,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py b/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py index 66eaa4243d..840e8d7130 100644 --- a/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py +++ b/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -39,12 +45,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/multi_map_clear_codec.py b/hazelcast/protocol/codec/multi_map_clear_codec.py index 6fe42e26db..f15c543213 100644 --- a/hazelcast/protocol/codec/multi_map_clear_codec.py +++ b/hazelcast/protocol/codec/multi_map_clear_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x020B00 diff --git a/hazelcast/protocol/codec/multi_map_contains_entry_codec.py b/hazelcast/protocol/codec/multi_map_contains_entry_codec.py index 934d5355a4..241caea2dd 100644 --- a/hazelcast/protocol/codec/multi_map_contains_entry_codec.py +++ b/hazelcast/protocol/codec/multi_map_contains_entry_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_contains_key_codec.py b/hazelcast/protocol/codec/multi_map_contains_key_codec.py index f01ecf66da..f697a2c66c 100644 --- a/hazelcast/protocol/codec/multi_map_contains_key_codec.py +++ b/hazelcast/protocol/codec/multi_map_contains_key_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_contains_value_codec.py b/hazelcast/protocol/codec/multi_map_contains_value_codec.py index 5cd15d3a62..b514236578 100644 --- a/hazelcast/protocol/codec/multi_map_contains_value_codec.py +++ b/hazelcast/protocol/codec/multi_map_contains_value_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_delete_codec.py b/hazelcast/protocol/codec/multi_map_delete_codec.py index 8a6bd44cb5..254bcd1aa5 100644 --- a/hazelcast/protocol/codec/multi_map_delete_codec.py +++ b/hazelcast/protocol/codec/multi_map_delete_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_entry_set_codec.py b/hazelcast/protocol/codec/multi_map_entry_set_codec.py index 26f974a1b4..0d5661c1a1 100644 --- a/hazelcast/protocol/codec/multi_map_entry_set_codec.py +++ b/hazelcast/protocol/codec/multi_map_entry_set_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_force_unlock_codec.py b/hazelcast/protocol/codec/multi_map_force_unlock_codec.py index baae79651b..7b452338e4 100644 --- a/hazelcast/protocol/codec/multi_map_force_unlock_codec.py +++ b/hazelcast/protocol/codec/multi_map_force_unlock_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_get_codec.py b/hazelcast/protocol/codec/multi_map_get_codec.py index 8267f55c02..b86f2fe147 100644 --- a/hazelcast/protocol/codec/multi_map_get_codec.py +++ b/hazelcast/protocol/codec/multi_map_get_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/multi_map_is_locked_codec.py b/hazelcast/protocol/codec/multi_map_is_locked_codec.py index e535373e2f..29e04791b4 100644 --- a/hazelcast/protocol/codec/multi_map_is_locked_codec.py +++ b/hazelcast/protocol/codec/multi_map_is_locked_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_key_set_codec.py b/hazelcast/protocol/codec/multi_map_key_set_codec.py index 35e9c89c76..dcec2f7298 100644 --- a/hazelcast/protocol/codec/multi_map_key_set_codec.py +++ b/hazelcast/protocol/codec/multi_map_key_set_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_lock_codec.py b/hazelcast/protocol/codec/multi_map_lock_codec.py index 09e80e3c08..e8df9cad81 100644 --- a/hazelcast/protocol/codec/multi_map_lock_codec.py +++ b/hazelcast/protocol/codec/multi_map_lock_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_put_codec.py b/hazelcast/protocol/codec/multi_map_put_codec.py index 493c83072d..1a0c472c67 100644 --- a/hazelcast/protocol/codec/multi_map_put_codec.py +++ b/hazelcast/protocol/codec/multi_map_put_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_remove_codec.py b/hazelcast/protocol/codec/multi_map_remove_codec.py index 29c56a071e..46d971ab87 100644 --- a/hazelcast/protocol/codec/multi_map_remove_codec.py +++ b/hazelcast/protocol/codec/multi_map_remove_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/multi_map_remove_entry_codec.py b/hazelcast/protocol/codec/multi_map_remove_entry_codec.py index f286076eed..7b5d3da250 100644 --- a/hazelcast/protocol/codec/multi_map_remove_entry_codec.py +++ b/hazelcast/protocol/codec/multi_map_remove_entry_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py b/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py index ec47a2e7a1..f64cc4c7ec 100644 --- a/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py +++ b/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x020F00 diff --git a/hazelcast/protocol/codec/multi_map_size_codec.py b/hazelcast/protocol/codec/multi_map_size_codec.py index ec108ee1d6..09941a4556 100644 --- a/hazelcast/protocol/codec/multi_map_size_codec.py +++ b/hazelcast/protocol/codec/multi_map_size_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x020A00 diff --git a/hazelcast/protocol/codec/multi_map_try_lock_codec.py b/hazelcast/protocol/codec/multi_map_try_lock_codec.py index f410cf121e..f7ea1493b0 100644 --- a/hazelcast/protocol/codec/multi_map_try_lock_codec.py +++ b/hazelcast/protocol/codec/multi_map_try_lock_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_unlock_codec.py b/hazelcast/protocol/codec/multi_map_unlock_codec.py index 5a14162d34..89a3453bd0 100644 --- a/hazelcast/protocol/codec/multi_map_unlock_codec.py +++ b/hazelcast/protocol/codec/multi_map_unlock_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_value_count_codec.py b/hazelcast/protocol/codec/multi_map_value_count_codec.py index 0a1a570c0e..eb5e3d30e7 100644 --- a/hazelcast/protocol/codec/multi_map_value_count_codec.py +++ b/hazelcast/protocol/codec/multi_map_value_count_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_values_codec.py b/hazelcast/protocol/codec/multi_map_values_codec.py index e61a82211b..e612369152 100644 --- a/hazelcast/protocol/codec/multi_map_values_codec.py +++ b/hazelcast/protocol/codec/multi_map_values_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/pn_counter_add_codec.py b/hazelcast/protocol/codec/pn_counter_add_codec.py index f4c9ba7d5a..0b66435bfc 100644 --- a/hazelcast/protocol/codec/pn_counter_add_codec.py +++ b/hazelcast/protocol/codec/pn_counter_add_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListUUIDLongCodec @@ -31,6 +36,8 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["value"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_VALUE_OFFSET) - response["replica_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET) + response["replica_count"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET + ) response["replica_timestamps"] = EntryListUUIDLongCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/pn_counter_get_codec.py b/hazelcast/protocol/codec/pn_counter_get_codec.py index 149c8dc2c0..cc9384b448 100644 --- a/hazelcast/protocol/codec/pn_counter_get_codec.py +++ b/hazelcast/protocol/codec/pn_counter_get_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListUUIDLongCodec @@ -27,6 +32,8 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["value"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_VALUE_OFFSET) - response["replica_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET) + response["replica_count"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET + ) response["replica_timestamps"] = EntryListUUIDLongCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py b/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py index 504fcca5d8..5f43dd5880 100644 --- a/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py +++ b/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x1D0300 diff --git a/hazelcast/protocol/codec/queue_add_all_codec.py b/hazelcast/protocol/codec/queue_add_all_codec.py index 8a2b58ee0e..1743464623 100644 --- a/hazelcast/protocol/codec/queue_add_all_codec.py +++ b/hazelcast/protocol/codec/queue_add_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_add_listener_codec.py b/hazelcast/protocol/codec/queue_add_listener_codec.py index 41f59af93b..8bf3264fdb 100644 --- a/hazelcast/protocol/codec/queue_add_listener_codec.py +++ b/hazelcast/protocol/codec/queue_add_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/queue_clear_codec.py b/hazelcast/protocol/codec/queue_clear_codec.py index f055b757b5..df5e3f69fb 100644 --- a/hazelcast/protocol/codec/queue_clear_codec.py +++ b/hazelcast/protocol/codec/queue_clear_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x030F00 diff --git a/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py b/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py index 56fb5ff438..224d1aa334 100644 --- a/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py +++ b/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py b/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py index 27a371827a..3a5e1fd8f1 100644 --- a/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py +++ b/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_contains_all_codec.py b/hazelcast/protocol/codec/queue_contains_all_codec.py index 07e24ef5bb..dc033088f7 100644 --- a/hazelcast/protocol/codec/queue_contains_all_codec.py +++ b/hazelcast/protocol/codec/queue_contains_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_contains_codec.py b/hazelcast/protocol/codec/queue_contains_codec.py index 49250f1838..9a5d310ef9 100644 --- a/hazelcast/protocol/codec/queue_contains_codec.py +++ b/hazelcast/protocol/codec/queue_contains_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_drain_to_codec.py b/hazelcast/protocol/codec/queue_drain_to_codec.py index 98b6208045..80e2eb96c5 100644 --- a/hazelcast/protocol/codec/queue_drain_to_codec.py +++ b/hazelcast/protocol/codec/queue_drain_to_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py b/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py index cbfd4831bb..571212c2a2 100644 --- a/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py +++ b/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_is_empty_codec.py b/hazelcast/protocol/codec/queue_is_empty_codec.py index 561c260af0..adf3a90a36 100644 --- a/hazelcast/protocol/codec/queue_is_empty_codec.py +++ b/hazelcast/protocol/codec/queue_is_empty_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x031400 diff --git a/hazelcast/protocol/codec/queue_iterator_codec.py b/hazelcast/protocol/codec/queue_iterator_codec.py index 908b58e6d6..8640b0f168 100644 --- a/hazelcast/protocol/codec/queue_iterator_codec.py +++ b/hazelcast/protocol/codec/queue_iterator_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_offer_codec.py b/hazelcast/protocol/codec/queue_offer_codec.py index 782800e4e0..de03a3feaf 100644 --- a/hazelcast/protocol/codec/queue_offer_codec.py +++ b/hazelcast/protocol/codec/queue_offer_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_peek_codec.py b/hazelcast/protocol/codec/queue_peek_codec.py index b382cf0b43..dc9bce703b 100644 --- a/hazelcast/protocol/codec/queue_peek_codec.py +++ b/hazelcast/protocol/codec/queue_peek_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/queue_poll_codec.py b/hazelcast/protocol/codec/queue_poll_codec.py index 72de092e3d..4a16315e19 100644 --- a/hazelcast/protocol/codec/queue_poll_codec.py +++ b/hazelcast/protocol/codec/queue_poll_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/queue_put_codec.py b/hazelcast/protocol/codec/queue_put_codec.py index 1d16075041..bef8e02f2a 100644 --- a/hazelcast/protocol/codec/queue_put_codec.py +++ b/hazelcast/protocol/codec/queue_put_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_remaining_capacity_codec.py b/hazelcast/protocol/codec/queue_remaining_capacity_codec.py index 20840bbe9c..3e4ebab2b4 100644 --- a/hazelcast/protocol/codec/queue_remaining_capacity_codec.py +++ b/hazelcast/protocol/codec/queue_remaining_capacity_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x031300 diff --git a/hazelcast/protocol/codec/queue_remove_codec.py b/hazelcast/protocol/codec/queue_remove_codec.py index a6356c7166..bd6c7c8ad2 100644 --- a/hazelcast/protocol/codec/queue_remove_codec.py +++ b/hazelcast/protocol/codec/queue_remove_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_remove_listener_codec.py b/hazelcast/protocol/codec/queue_remove_listener_codec.py index 5fecf5d315..36099de182 100644 --- a/hazelcast/protocol/codec/queue_remove_listener_codec.py +++ b/hazelcast/protocol/codec/queue_remove_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x031200 diff --git a/hazelcast/protocol/codec/queue_size_codec.py b/hazelcast/protocol/codec/queue_size_codec.py index 747ff4a6cc..d7c507a93c 100644 --- a/hazelcast/protocol/codec/queue_size_codec.py +++ b/hazelcast/protocol/codec/queue_size_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x030300 diff --git a/hazelcast/protocol/codec/queue_take_codec.py b/hazelcast/protocol/codec/queue_take_codec.py index 1cef947bb8..c990444a6f 100644 --- a/hazelcast/protocol/codec/queue_take_codec.py +++ b/hazelcast/protocol/codec/queue_take_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py index 9243021f98..fe97ac9a86 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -36,12 +42,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py index 1e1f47075a..de1dee1a79 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -37,12 +43,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py index 5f804087b8..ff97a734d2 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -38,12 +44,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py index 5ca861ef74..1bc415f49c 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -37,12 +43,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py b/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py index 85ac2df246..50c4349d5d 100644 --- a/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -38,12 +44,18 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) + event_type = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) + number_of_affected_entries = FixSizedTypesCodec.decode_int( + initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET + ) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) + handle_entry_event( + key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries + ) return diff --git a/hazelcast/protocol/codec/replicated_map_clear_codec.py b/hazelcast/protocol/codec/replicated_map_clear_codec.py index 1a43cecc72..3e2c93dfac 100644 --- a/hazelcast/protocol/codec/replicated_map_clear_codec.py +++ b/hazelcast/protocol/codec/replicated_map_clear_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0900 diff --git a/hazelcast/protocol/codec/replicated_map_contains_key_codec.py b/hazelcast/protocol/codec/replicated_map_contains_key_codec.py index 51516cc044..158bb5f23c 100644 --- a/hazelcast/protocol/codec/replicated_map_contains_key_codec.py +++ b/hazelcast/protocol/codec/replicated_map_contains_key_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_contains_value_codec.py b/hazelcast/protocol/codec/replicated_map_contains_value_codec.py index 7b1bf23021..b6de936cc4 100644 --- a/hazelcast/protocol/codec/replicated_map_contains_value_codec.py +++ b/hazelcast/protocol/codec/replicated_map_contains_value_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_entry_set_codec.py b/hazelcast/protocol/codec/replicated_map_entry_set_codec.py index e66c0914f8..118fd2a36d 100644 --- a/hazelcast/protocol/codec/replicated_map_entry_set_codec.py +++ b/hazelcast/protocol/codec/replicated_map_entry_set_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_get_codec.py b/hazelcast/protocol/codec/replicated_map_get_codec.py index 6529fe9997..b8739e73c4 100644 --- a/hazelcast/protocol/codec/replicated_map_get_codec.py +++ b/hazelcast/protocol/codec/replicated_map_get_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_is_empty_codec.py b/hazelcast/protocol/codec/replicated_map_is_empty_codec.py index 249e4487a7..13fc340299 100644 --- a/hazelcast/protocol/codec/replicated_map_is_empty_codec.py +++ b/hazelcast/protocol/codec/replicated_map_is_empty_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0300 diff --git a/hazelcast/protocol/codec/replicated_map_key_set_codec.py b/hazelcast/protocol/codec/replicated_map_key_set_codec.py index 192439648f..b15df6644c 100644 --- a/hazelcast/protocol/codec/replicated_map_key_set_codec.py +++ b/hazelcast/protocol/codec/replicated_map_key_set_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_put_all_codec.py b/hazelcast/protocol/codec/replicated_map_put_all_codec.py index e0f1741dd0..eb0b1b0903 100644 --- a/hazelcast/protocol/codec/replicated_map_put_all_codec.py +++ b/hazelcast/protocol/codec/replicated_map_put_all_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_put_codec.py b/hazelcast/protocol/codec/replicated_map_put_codec.py index f0f0040ebe..9027f1394f 100644 --- a/hazelcast/protocol/codec/replicated_map_put_codec.py +++ b/hazelcast/protocol/codec/replicated_map_put_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_remove_codec.py b/hazelcast/protocol/codec/replicated_map_remove_codec.py index d5289eb9a3..ca2f7ac023 100644 --- a/hazelcast/protocol/codec/replicated_map_remove_codec.py +++ b/hazelcast/protocol/codec/replicated_map_remove_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py b/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py index 29197dcc1a..cdb331dbb0 100644 --- a/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py +++ b/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0E00 diff --git a/hazelcast/protocol/codec/replicated_map_size_codec.py b/hazelcast/protocol/codec/replicated_map_size_codec.py index de73651a23..519657930e 100644 --- a/hazelcast/protocol/codec/replicated_map_size_codec.py +++ b/hazelcast/protocol/codec/replicated_map_size_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0200 diff --git a/hazelcast/protocol/codec/replicated_map_values_codec.py b/hazelcast/protocol/codec/replicated_map_values_codec.py index 85f6d85ff0..db827b864a 100644 --- a/hazelcast/protocol/codec/replicated_map_values_codec.py +++ b/hazelcast/protocol/codec/replicated_map_values_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/ringbuffer_add_all_codec.py b/hazelcast/protocol/codec/ringbuffer_add_all_codec.py index 9982d2f43b..72d41f9410 100644 --- a/hazelcast/protocol/codec/ringbuffer_add_all_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_add_all_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/ringbuffer_add_codec.py b/hazelcast/protocol/codec/ringbuffer_add_codec.py index 827ca3e245..5157572f90 100644 --- a/hazelcast/protocol/codec/ringbuffer_add_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_add_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/ringbuffer_capacity_codec.py b/hazelcast/protocol/codec/ringbuffer_capacity_codec.py index c6f66d8b01..8b0d869cc1 100644 --- a/hazelcast/protocol/codec/ringbuffer_capacity_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_capacity_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x170400 diff --git a/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py b/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py index 2d68f84f04..c8db96bd53 100644 --- a/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x170300 diff --git a/hazelcast/protocol/codec/ringbuffer_read_many_codec.py b/hazelcast/protocol/codec/ringbuffer_read_many_codec.py index 5e9afce8d6..b2040c02c4 100644 --- a/hazelcast/protocol/codec/ringbuffer_read_many_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_read_many_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -33,8 +38,12 @@ def encode_request(name, start_sequence, min_count, max_count, filter): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["read_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET) - response["next_seq"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET) + response["read_count"] = FixSizedTypesCodec.decode_int( + initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET + ) + response["next_seq"] = FixSizedTypesCodec.decode_long( + initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET + ) response["items"] = ListMultiFrameCodec.decode(msg, DataCodec.decode) response["item_seqs"] = CodecUtil.decode_nullable(msg, LongArrayCodec.decode) return response diff --git a/hazelcast/protocol/codec/ringbuffer_read_one_codec.py b/hazelcast/protocol/codec/ringbuffer_read_one_codec.py index 9480196294..4cef6c19b4 100644 --- a/hazelcast/protocol/codec/ringbuffer_read_one_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_read_one_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py b/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py index 26b1245789..520a29f638 100644 --- a/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x170500 diff --git a/hazelcast/protocol/codec/ringbuffer_size_codec.py b/hazelcast/protocol/codec/ringbuffer_size_codec.py index 02924b7c85..89ba885374 100644 --- a/hazelcast/protocol/codec/ringbuffer_size_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_size_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x170100 diff --git a/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py b/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py index c575287018..a39b1148d8 100644 --- a/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x170200 diff --git a/hazelcast/protocol/codec/semaphore_acquire_codec.py b/hazelcast/protocol/codec/semaphore_acquire_codec.py index 839d4a9ef5..bc4b3b779e 100644 --- a/hazelcast/protocol/codec/semaphore_acquire_codec.py +++ b/hazelcast/protocol/codec/semaphore_acquire_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_available_permits_codec.py b/hazelcast/protocol/codec/semaphore_available_permits_codec.py index 659ee4d9b2..b67cd29088 100644 --- a/hazelcast/protocol/codec/semaphore_available_permits_codec.py +++ b/hazelcast/protocol/codec/semaphore_available_permits_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_change_codec.py b/hazelcast/protocol/codec/semaphore_change_codec.py index 98eeba4c52..a6ee89b79d 100644 --- a/hazelcast/protocol/codec/semaphore_change_codec.py +++ b/hazelcast/protocol/codec/semaphore_change_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_drain_codec.py b/hazelcast/protocol/codec/semaphore_drain_codec.py index 6d3b944b4c..24f190a0cc 100644 --- a/hazelcast/protocol/codec/semaphore_drain_codec.py +++ b/hazelcast/protocol/codec/semaphore_drain_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py b/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py index 31f6f037fe..e58a6f8c1c 100644 --- a/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py +++ b/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0C0700 diff --git a/hazelcast/protocol/codec/semaphore_init_codec.py b/hazelcast/protocol/codec/semaphore_init_codec.py index 22ff60d144..76c859d13a 100644 --- a/hazelcast/protocol/codec/semaphore_init_codec.py +++ b/hazelcast/protocol/codec/semaphore_init_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_release_codec.py b/hazelcast/protocol/codec/semaphore_release_codec.py index 9bbf4e5c70..5285562591 100644 --- a/hazelcast/protocol/codec/semaphore_release_codec.py +++ b/hazelcast/protocol/codec/semaphore_release_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/set_add_all_codec.py b/hazelcast/protocol/codec/set_add_all_codec.py index 9f24d02757..59d255d988 100644 --- a/hazelcast/protocol/codec/set_add_all_codec.py +++ b/hazelcast/protocol/codec/set_add_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_add_codec.py b/hazelcast/protocol/codec/set_add_codec.py index 4c39c67e4b..ac6580d544 100644 --- a/hazelcast/protocol/codec/set_add_codec.py +++ b/hazelcast/protocol/codec/set_add_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_add_listener_codec.py b/hazelcast/protocol/codec/set_add_listener_codec.py index 987558fdfa..8b9c467a30 100644 --- a/hazelcast/protocol/codec/set_add_listener_codec.py +++ b/hazelcast/protocol/codec/set_add_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/set_clear_codec.py b/hazelcast/protocol/codec/set_clear_codec.py index 93c8ea4229..ebcf9ccb18 100644 --- a/hazelcast/protocol/codec/set_clear_codec.py +++ b/hazelcast/protocol/codec/set_clear_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x060900 diff --git a/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py b/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py index ae90977820..440813dba9 100644 --- a/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py +++ b/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py b/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py index b736fca717..f2416bdf2d 100644 --- a/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py +++ b/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_contains_all_codec.py b/hazelcast/protocol/codec/set_contains_all_codec.py index 40033dfe9b..8c0c9e403e 100644 --- a/hazelcast/protocol/codec/set_contains_all_codec.py +++ b/hazelcast/protocol/codec/set_contains_all_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_contains_codec.py b/hazelcast/protocol/codec/set_contains_codec.py index 6d3a6bc19e..c49755dadf 100644 --- a/hazelcast/protocol/codec/set_contains_codec.py +++ b/hazelcast/protocol/codec/set_contains_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_get_all_codec.py b/hazelcast/protocol/codec/set_get_all_codec.py index 74c3d86947..077ba9efb1 100644 --- a/hazelcast/protocol/codec/set_get_all_codec.py +++ b/hazelcast/protocol/codec/set_get_all_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_is_empty_codec.py b/hazelcast/protocol/codec/set_is_empty_codec.py index 4fba7a2a71..a6b8bd894d 100644 --- a/hazelcast/protocol/codec/set_is_empty_codec.py +++ b/hazelcast/protocol/codec/set_is_empty_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x060D00 diff --git a/hazelcast/protocol/codec/set_remove_codec.py b/hazelcast/protocol/codec/set_remove_codec.py index a88decce28..dc98419997 100644 --- a/hazelcast/protocol/codec/set_remove_codec.py +++ b/hazelcast/protocol/codec/set_remove_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_remove_listener_codec.py b/hazelcast/protocol/codec/set_remove_listener_codec.py index fe0ae06816..b3f9b26dd4 100644 --- a/hazelcast/protocol/codec/set_remove_listener_codec.py +++ b/hazelcast/protocol/codec/set_remove_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x060C00 diff --git a/hazelcast/protocol/codec/set_size_codec.py b/hazelcast/protocol/codec/set_size_codec.py index d5a7fd1f76..cb25b95858 100644 --- a/hazelcast/protocol/codec/set_size_codec.py +++ b/hazelcast/protocol/codec/set_size_codec.py @@ -1,5 +1,10 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x060100 diff --git a/hazelcast/protocol/codec/topic_add_message_listener_codec.py b/hazelcast/protocol/codec/topic_add_message_listener_codec.py index f82124d491..e89b65151c 100644 --- a/hazelcast/protocol/codec/topic_add_message_listener_codec.py +++ b/hazelcast/protocol/codec/topic_add_message_listener_codec.py @@ -1,6 +1,12 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, + EVENT_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec @@ -34,7 +40,9 @@ def handle(msg, handle_topic_event=None): message_type = msg.get_message_type() if message_type == _EVENT_TOPIC_MESSAGE_TYPE and handle_topic_event is not None: initial_frame = msg.next_frame() - publish_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _EVENT_TOPIC_PUBLISH_TIME_OFFSET) + publish_time = FixSizedTypesCodec.decode_long( + initial_frame.buf, _EVENT_TOPIC_PUBLISH_TIME_OFFSET + ) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_TOPIC_UUID_OFFSET) item = DataCodec.decode(msg) handle_topic_event(item, publish_time, uuid) diff --git a/hazelcast/protocol/codec/topic_publish_codec.py b/hazelcast/protocol/codec/topic_publish_codec.py index cf80610184..cff9ae4ab7 100644 --- a/hazelcast/protocol/codec/topic_publish_codec.py +++ b/hazelcast/protocol/codec/topic_publish_codec.py @@ -1,4 +1,8 @@ -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/topic_remove_message_listener_codec.py b/hazelcast/protocol/codec/topic_remove_message_listener_codec.py index cdcacd6437..8bf4a2a5ad 100644 --- a/hazelcast/protocol/codec/topic_remove_message_listener_codec.py +++ b/hazelcast/protocol/codec/topic_remove_message_listener_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x040300 diff --git a/hazelcast/protocol/codec/transaction_commit_codec.py b/hazelcast/protocol/codec/transaction_commit_codec.py index 6352c1402e..76d1ad75ba 100644 --- a/hazelcast/protocol/codec/transaction_commit_codec.py +++ b/hazelcast/protocol/codec/transaction_commit_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) # hex: 0x150100 _REQUEST_MESSAGE_TYPE = 1376512 diff --git a/hazelcast/protocol/codec/transaction_create_codec.py b/hazelcast/protocol/codec/transaction_create_codec.py index 50346a489d..560d0a275f 100644 --- a/hazelcast/protocol/codec/transaction_create_codec.py +++ b/hazelcast/protocol/codec/transaction_create_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) # hex: 0x150200 _REQUEST_MESSAGE_TYPE = 1376768 diff --git a/hazelcast/protocol/codec/transaction_rollback_codec.py b/hazelcast/protocol/codec/transaction_rollback_codec.py index 49bcf73b6e..2c78f8c555 100644 --- a/hazelcast/protocol/codec/transaction_rollback_codec.py +++ b/hazelcast/protocol/codec/transaction_rollback_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) # hex: 0x150300 _REQUEST_MESSAGE_TYPE = 1377024 diff --git a/hazelcast/protocol/codec/transactional_list_add_codec.py b/hazelcast/protocol/codec/transactional_list_add_codec.py index a12dbf134b..df0c67e95f 100644 --- a/hazelcast/protocol/codec/transactional_list_add_codec.py +++ b/hazelcast/protocol/codec/transactional_list_add_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_list_remove_codec.py b/hazelcast/protocol/codec/transactional_list_remove_codec.py index 243fb8eac8..5e6689d6ef 100644 --- a/hazelcast/protocol/codec/transactional_list_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_list_remove_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_list_size_codec.py b/hazelcast/protocol/codec/transactional_list_size_codec.py index 24178e3f27..a2e5d20baf 100644 --- a/hazelcast/protocol/codec/transactional_list_size_codec.py +++ b/hazelcast/protocol/codec/transactional_list_size_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x110300 diff --git a/hazelcast/protocol/codec/transactional_map_contains_key_codec.py b/hazelcast/protocol/codec/transactional_map_contains_key_codec.py index ef5ee0026c..d8ac6a9839 100644 --- a/hazelcast/protocol/codec/transactional_map_contains_key_codec.py +++ b/hazelcast/protocol/codec/transactional_map_contains_key_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_contains_value_codec.py b/hazelcast/protocol/codec/transactional_map_contains_value_codec.py index d1aa58bed6..b3a6b19684 100644 --- a/hazelcast/protocol/codec/transactional_map_contains_value_codec.py +++ b/hazelcast/protocol/codec/transactional_map_contains_value_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_delete_codec.py b/hazelcast/protocol/codec/transactional_map_delete_codec.py index c5b44716fc..8109d872f8 100644 --- a/hazelcast/protocol/codec/transactional_map_delete_codec.py +++ b/hazelcast/protocol/codec/transactional_map_delete_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_get_codec.py b/hazelcast/protocol/codec/transactional_map_get_codec.py index 948d6a2c18..21b679ae6d 100644 --- a/hazelcast/protocol/codec/transactional_map_get_codec.py +++ b/hazelcast/protocol/codec/transactional_map_get_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py b/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py index 7baa3fb460..95462371ee 100644 --- a/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py +++ b/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_is_empty_codec.py b/hazelcast/protocol/codec/transactional_map_is_empty_codec.py index b9698b76b8..3042b897e7 100644 --- a/hazelcast/protocol/codec/transactional_map_is_empty_codec.py +++ b/hazelcast/protocol/codec/transactional_map_is_empty_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0E0500 diff --git a/hazelcast/protocol/codec/transactional_map_key_set_codec.py b/hazelcast/protocol/codec/transactional_map_key_set_codec.py index 9f6685ba60..08b9c4efa9 100644 --- a/hazelcast/protocol/codec/transactional_map_key_set_codec.py +++ b/hazelcast/protocol/codec/transactional_map_key_set_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py b/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py index 0c1b350216..980f99daec 100644 --- a/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py +++ b/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_map_put_codec.py b/hazelcast/protocol/codec/transactional_map_put_codec.py index 168d3226e8..d3941673c9 100644 --- a/hazelcast/protocol/codec/transactional_map_put_codec.py +++ b/hazelcast/protocol/codec/transactional_map_put_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py b/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py index 8347608abc..421eea248d 100644 --- a/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py +++ b/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_remove_codec.py b/hazelcast/protocol/codec/transactional_map_remove_codec.py index 8d113267f9..79c746907f 100644 --- a/hazelcast/protocol/codec/transactional_map_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_map_remove_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py b/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py index 5815f2ef4a..8dac2fc790 100644 --- a/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py +++ b/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_replace_codec.py b/hazelcast/protocol/codec/transactional_map_replace_codec.py index c72b508a7a..bdda83131d 100644 --- a/hazelcast/protocol/codec/transactional_map_replace_codec.py +++ b/hazelcast/protocol/codec/transactional_map_replace_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py b/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py index a528dc0e51..d719c41c65 100644 --- a/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py +++ b/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_set_codec.py b/hazelcast/protocol/codec/transactional_map_set_codec.py index 03c28abd42..71b1307542 100644 --- a/hazelcast/protocol/codec/transactional_map_set_codec.py +++ b/hazelcast/protocol/codec/transactional_map_set_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_size_codec.py b/hazelcast/protocol/codec/transactional_map_size_codec.py index 2003a033d0..55b6bf53a1 100644 --- a/hazelcast/protocol/codec/transactional_map_size_codec.py +++ b/hazelcast/protocol/codec/transactional_map_size_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0E0400 diff --git a/hazelcast/protocol/codec/transactional_map_values_codec.py b/hazelcast/protocol/codec/transactional_map_values_codec.py index 719dce5530..07a2402fb1 100644 --- a/hazelcast/protocol/codec/transactional_map_values_codec.py +++ b/hazelcast/protocol/codec/transactional_map_values_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py b/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py index ab1726580a..1b17ff01f0 100644 --- a/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py +++ b/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_get_codec.py b/hazelcast/protocol/codec/transactional_multi_map_get_codec.py index 52aee889f3..c3bfa36918 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_get_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_get_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_put_codec.py b/hazelcast/protocol/codec/transactional_multi_map_put_codec.py index 6f9708ea77..5d71dfec45 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_put_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_put_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py b/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py index 0391af6469..052a7e626b 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py b/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py index bfe777b503..10ca77a5e6 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_size_codec.py b/hazelcast/protocol/codec/transactional_multi_map_size_codec.py index e0db226d88..2335e0e0d4 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_size_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_size_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x0F0600 diff --git a/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py b/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py index be87494996..9618360539 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_queue_offer_codec.py b/hazelcast/protocol/codec/transactional_queue_offer_codec.py index b21d04d02b..84ed8681b2 100644 --- a/hazelcast/protocol/codec/transactional_queue_offer_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_offer_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_queue_peek_codec.py b/hazelcast/protocol/codec/transactional_queue_peek_codec.py index ca7f22a95c..d5cafa0006 100644 --- a/hazelcast/protocol/codec/transactional_queue_peek_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_peek_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_queue_poll_codec.py b/hazelcast/protocol/codec/transactional_queue_poll_codec.py index 924d9bc671..a918131805 100644 --- a/hazelcast/protocol/codec/transactional_queue_poll_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_poll_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_queue_size_codec.py b/hazelcast/protocol/codec/transactional_queue_size_codec.py index 20039dd1dd..86e83af4a2 100644 --- a/hazelcast/protocol/codec/transactional_queue_size_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_size_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x120500 diff --git a/hazelcast/protocol/codec/transactional_queue_take_codec.py b/hazelcast/protocol/codec/transactional_queue_take_codec.py index 0dfcfcbec7..365a675693 100644 --- a/hazelcast/protocol/codec/transactional_queue_take_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_take_codec.py @@ -1,6 +1,10 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_set_add_codec.py b/hazelcast/protocol/codec/transactional_set_add_codec.py index 7680876274..a269630e36 100644 --- a/hazelcast/protocol/codec/transactional_set_add_codec.py +++ b/hazelcast/protocol/codec/transactional_set_add_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_set_remove_codec.py b/hazelcast/protocol/codec/transactional_set_remove_codec.py index a6b6a21460..75c2a63f0a 100644 --- a/hazelcast/protocol/codec/transactional_set_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_set_remove_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_set_size_codec.py b/hazelcast/protocol/codec/transactional_set_size_codec.py index f20e63e3d8..62ce8b622a 100644 --- a/hazelcast/protocol/codec/transactional_set_size_codec.py +++ b/hazelcast/protocol/codec/transactional_set_size_codec.py @@ -1,6 +1,11 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE +from hazelcast.protocol.client_message import ( + OutboundMessage, + REQUEST_HEADER_SIZE, + create_initial_buffer, + RESPONSE_HEADER_SIZE, +) from hazelcast.protocol.builtin import StringCodec # hex: 0x100300 diff --git a/pyproject.toml b/pyproject.toml index a1a1160df1..d1e66c1cc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,11 +15,10 @@ exclude = ''' | dist | benchmarks - | hazelcast/protocol | hazelcast/proxy | hazelcast/serialization | tests )/ - | /hazelcast/(?!(__init__)\.py).+ + | /hazelcast/(?!(__init__))\w+\.py ) ''' From a84207669f71434ad2ee2867cefa5c2ac5da50ec Mon Sep 17 00:00:00 2001 From: mdumandag Date: Wed, 6 Jan 2021 17:55:17 +0300 Subject: [PATCH 2/2] do not lint autogenerated codecs --- .../codec/atomic_long_add_and_get_codec.py | 7 +- .../protocol/codec/atomic_long_alter_codec.py | 7 +- .../protocol/codec/atomic_long_apply_codec.py | 6 +- .../atomic_long_compare_and_set_codec.py | 7 +- .../codec/atomic_long_get_and_add_codec.py | 7 +- .../codec/atomic_long_get_and_set_codec.py | 7 +- .../protocol/codec/atomic_long_get_codec.py | 7 +- .../protocol/codec/atomic_ref_apply_codec.py | 6 +- .../codec/atomic_ref_compare_and_set_codec.py | 7 +- .../codec/atomic_ref_contains_codec.py | 7 +- .../protocol/codec/atomic_ref_get_codec.py | 6 +- .../protocol/codec/atomic_ref_set_codec.py | 6 +- .../client_add_cluster_view_listener_codec.py | 20 +---- ...t_add_distributed_object_listener_codec.py | 17 +--- ...lient_add_partition_lost_listener_codec.py | 33 ++------ .../codec/client_authentication_codec.py | 43 ++-------- .../client_authentication_custom_codec.py | 42 ++-------- .../codec/client_create_proxies_codec.py | 6 +- .../codec/client_create_proxy_codec.py | 6 +- .../codec/client_destroy_proxy_codec.py | 6 +- .../client_get_distributed_objects_codec.py | 6 +- .../client_local_backup_listener_codec.py | 12 +-- hazelcast/protocol/codec/client_ping_codec.py | 6 +- ...emove_distributed_object_listener_codec.py | 7 +- ...nt_remove_partition_lost_listener_codec.py | 7 +- .../protocol/codec/client_statistics_codec.py | 6 +- ...ient_trigger_partition_assignment_codec.py | 6 +- .../codec/count_down_latch_await_codec.py | 7 +- .../count_down_latch_count_down_codec.py | 6 +- .../codec/count_down_latch_get_count_codec.py | 7 +- .../codec/count_down_latch_get_round_codec.py | 7 +- .../count_down_latch_try_set_count_codec.py | 7 +- .../codec/cp_group_create_cp_group_codec.py | 6 +- .../codec/cp_group_destroy_cp_object_codec.py | 6 +- .../codec/cp_session_close_session_codec.py | 7 +- .../codec/cp_session_create_session_codec.py | 19 +---- .../cp_session_generate_thread_id_codec.py | 7 +- .../cp_session_heartbeat_session_codec.py | 6 +- .../protocol/codec/custom/address_codec.py | 7 +- .../custom/anchor_data_list_holder_codec.py | 4 +- .../custom/bitmap_index_options_codec.py | 23 +----- .../codec/custom/endpoint_qualifier_codec.py | 11 +-- .../codec/custom/error_holder_codec.py | 19 +---- .../codec/custom/index_config_codec.py | 11 +-- .../codec/custom/member_info_codec.py | 27 ++---- .../codec/custom/member_version_codec.py | 19 +---- .../custom/paging_predicate_holder_codec.py | 39 ++------- .../codec/custom/raft_group_id_codec.py | 7 +- .../codec/custom/simple_entry_view_codec.py | 82 ++++--------------- .../codec/custom/stack_trace_element_codec.py | 15 +--- ...executor_service_cancel_on_member_codec.py | 7 +- ...cutor_service_cancel_on_partition_codec.py | 7 +- .../executor_service_is_shutdown_codec.py | 7 +- .../codec/executor_service_shutdown_codec.py | 6 +- ...executor_service_submit_to_member_codec.py | 6 +- ...cutor_service_submit_to_partition_codec.py | 6 +- .../fenced_lock_get_lock_ownership_codec.py | 19 +---- .../protocol/codec/fenced_lock_lock_codec.py | 7 +- .../codec/fenced_lock_try_lock_codec.py | 7 +- .../codec/fenced_lock_unlock_codec.py | 7 +- .../flake_id_generator_new_id_batch_codec.py | 15 +--- .../protocol/codec/list_add_all_codec.py | 7 +- .../codec/list_add_all_with_index_codec.py | 7 +- hazelcast/protocol/codec/list_add_codec.py | 7 +- .../protocol/codec/list_add_listener_codec.py | 8 +- .../codec/list_add_with_index_codec.py | 6 +- hazelcast/protocol/codec/list_clear_codec.py | 6 +- .../list_compare_and_remove_all_codec.py | 7 +- .../list_compare_and_retain_all_codec.py | 7 +- .../protocol/codec/list_contains_all_codec.py | 7 +- .../protocol/codec/list_contains_codec.py | 7 +- .../protocol/codec/list_get_all_codec.py | 6 +- hazelcast/protocol/codec/list_get_codec.py | 6 +- .../protocol/codec/list_index_of_codec.py | 7 +- .../protocol/codec/list_is_empty_codec.py | 7 +- .../protocol/codec/list_iterator_codec.py | 6 +- .../codec/list_last_index_of_codec.py | 7 +- .../codec/list_list_iterator_codec.py | 6 +- hazelcast/protocol/codec/list_remove_codec.py | 7 +- .../codec/list_remove_listener_codec.py | 7 +- .../codec/list_remove_with_index_codec.py | 6 +- hazelcast/protocol/codec/list_set_codec.py | 6 +- hazelcast/protocol/codec/list_size_codec.py | 7 +- hazelcast/protocol/codec/list_sub_codec.py | 6 +- .../codec/map_add_entry_listener_codec.py | 20 +---- .../map_add_entry_listener_to_key_codec.py | 20 +---- ...ry_listener_to_key_with_predicate_codec.py | 20 +---- ...add_entry_listener_with_predicate_codec.py | 20 +---- .../protocol/codec/map_add_index_codec.py | 6 +- .../codec/map_add_interceptor_codec.py | 6 +- ..._near_cache_invalidation_listener_codec.py | 38 ++------- .../map_add_partition_lost_listener_codec.py | 25 ++---- .../protocol/codec/map_aggregate_codec.py | 6 +- .../map_aggregate_with_predicate_codec.py | 6 +- hazelcast/protocol/codec/map_clear_codec.py | 6 +- .../protocol/codec/map_contains_key_codec.py | 7 +- .../codec/map_contains_value_codec.py | 7 +- hazelcast/protocol/codec/map_delete_codec.py | 6 +- ...map_entries_with_paging_predicate_codec.py | 6 +- .../codec/map_entries_with_predicate_codec.py | 6 +- .../protocol/codec/map_entry_set_codec.py | 6 +- .../codec/map_event_journal_read_codec.py | 15 +--- .../map_event_journal_subscribe_codec.py | 15 +--- .../protocol/codec/map_evict_all_codec.py | 6 +- hazelcast/protocol/codec/map_evict_codec.py | 7 +- .../codec/map_execute_on_all_keys_codec.py | 6 +- .../codec/map_execute_on_key_codec.py | 6 +- .../codec/map_execute_on_keys_codec.py | 6 +- .../codec/map_execute_with_predicate_codec.py | 6 +- hazelcast/protocol/codec/map_flush_codec.py | 6 +- .../protocol/codec/map_force_unlock_codec.py | 6 +- hazelcast/protocol/codec/map_get_all_codec.py | 6 +- hazelcast/protocol/codec/map_get_codec.py | 6 +- .../codec/map_get_entry_view_codec.py | 11 +-- .../protocol/codec/map_is_empty_codec.py | 7 +- .../protocol/codec/map_is_locked_codec.py | 7 +- hazelcast/protocol/codec/map_key_set_codec.py | 6 +- ...map_key_set_with_paging_predicate_codec.py | 6 +- .../codec/map_key_set_with_predicate_codec.py | 6 +- .../protocol/codec/map_load_all_codec.py | 10 +-- .../codec/map_load_given_keys_codec.py | 10 +-- hazelcast/protocol/codec/map_lock_codec.py | 6 +- hazelcast/protocol/codec/map_project_codec.py | 6 +- .../codec/map_project_with_predicate_codec.py | 6 +- hazelcast/protocol/codec/map_put_all_codec.py | 6 +- hazelcast/protocol/codec/map_put_codec.py | 6 +- .../protocol/codec/map_put_if_absent_codec.py | 6 +- .../map_put_if_absent_with_max_idle_codec.py | 6 +- .../protocol/codec/map_put_transient_codec.py | 6 +- .../map_put_transient_with_max_idle_codec.py | 6 +- .../codec/map_put_with_max_idle_codec.py | 6 +- .../protocol/codec/map_remove_all_codec.py | 6 +- hazelcast/protocol/codec/map_remove_codec.py | 6 +- .../codec/map_remove_entry_listener_codec.py | 7 +- .../codec/map_remove_if_same_codec.py | 7 +- .../codec/map_remove_interceptor_codec.py | 7 +- ...ap_remove_partition_lost_listener_codec.py | 7 +- hazelcast/protocol/codec/map_replace_codec.py | 6 +- .../codec/map_replace_if_same_codec.py | 7 +- hazelcast/protocol/codec/map_set_codec.py | 6 +- hazelcast/protocol/codec/map_set_ttl_codec.py | 7 +- .../codec/map_set_with_max_idle_codec.py | 6 +- hazelcast/protocol/codec/map_size_codec.py | 7 +- .../protocol/codec/map_submit_to_key_codec.py | 6 +- .../protocol/codec/map_try_lock_codec.py | 7 +- hazelcast/protocol/codec/map_try_put_codec.py | 7 +- .../protocol/codec/map_try_remove_codec.py | 7 +- hazelcast/protocol/codec/map_unlock_codec.py | 6 +- hazelcast/protocol/codec/map_values_codec.py | 6 +- .../map_values_with_paging_predicate_codec.py | 6 +- .../codec/map_values_with_predicate_codec.py | 6 +- .../multi_map_add_entry_listener_codec.py | 20 +---- ...lti_map_add_entry_listener_to_key_codec.py | 20 +---- .../protocol/codec/multi_map_clear_codec.py | 6 +- .../codec/multi_map_contains_entry_codec.py | 7 +- .../codec/multi_map_contains_key_codec.py | 7 +- .../codec/multi_map_contains_value_codec.py | 7 +- .../protocol/codec/multi_map_delete_codec.py | 6 +- .../codec/multi_map_entry_set_codec.py | 6 +- .../codec/multi_map_force_unlock_codec.py | 6 +- .../protocol/codec/multi_map_get_codec.py | 6 +- .../codec/multi_map_is_locked_codec.py | 7 +- .../protocol/codec/multi_map_key_set_codec.py | 6 +- .../protocol/codec/multi_map_lock_codec.py | 6 +- .../protocol/codec/multi_map_put_codec.py | 7 +- .../protocol/codec/multi_map_remove_codec.py | 6 +- .../codec/multi_map_remove_entry_codec.py | 7 +- .../multi_map_remove_entry_listener_codec.py | 7 +- .../protocol/codec/multi_map_size_codec.py | 7 +- .../codec/multi_map_try_lock_codec.py | 7 +- .../protocol/codec/multi_map_unlock_codec.py | 6 +- .../codec/multi_map_value_count_codec.py | 7 +- .../protocol/codec/multi_map_values_codec.py | 6 +- .../protocol/codec/pn_counter_add_codec.py | 11 +-- .../protocol/codec/pn_counter_get_codec.py | 11 +-- ...nter_get_configured_replica_count_codec.py | 7 +- .../protocol/codec/queue_add_all_codec.py | 7 +- .../codec/queue_add_listener_codec.py | 8 +- hazelcast/protocol/codec/queue_clear_codec.py | 6 +- .../queue_compare_and_remove_all_codec.py | 7 +- .../queue_compare_and_retain_all_codec.py | 7 +- .../codec/queue_contains_all_codec.py | 7 +- .../protocol/codec/queue_contains_codec.py | 7 +- .../protocol/codec/queue_drain_to_codec.py | 6 +- .../codec/queue_drain_to_max_size_codec.py | 6 +- .../protocol/codec/queue_is_empty_codec.py | 7 +- .../protocol/codec/queue_iterator_codec.py | 6 +- hazelcast/protocol/codec/queue_offer_codec.py | 7 +- hazelcast/protocol/codec/queue_peek_codec.py | 6 +- hazelcast/protocol/codec/queue_poll_codec.py | 6 +- hazelcast/protocol/codec/queue_put_codec.py | 6 +- .../codec/queue_remaining_capacity_codec.py | 7 +- .../protocol/codec/queue_remove_codec.py | 7 +- .../codec/queue_remove_listener_codec.py | 7 +- hazelcast/protocol/codec/queue_size_codec.py | 7 +- hazelcast/protocol/codec/queue_take_codec.py | 6 +- ...replicated_map_add_entry_listener_codec.py | 20 +---- ...ted_map_add_entry_listener_to_key_codec.py | 20 +---- ...ry_listener_to_key_with_predicate_codec.py | 20 +---- ...add_entry_listener_with_predicate_codec.py | 20 +---- ...map_add_near_cache_entry_listener_codec.py | 20 +---- .../codec/replicated_map_clear_codec.py | 6 +- .../replicated_map_contains_key_codec.py | 7 +- .../replicated_map_contains_value_codec.py | 7 +- .../codec/replicated_map_entry_set_codec.py | 6 +- .../codec/replicated_map_get_codec.py | 6 +- .../codec/replicated_map_is_empty_codec.py | 7 +- .../codec/replicated_map_key_set_codec.py | 6 +- .../codec/replicated_map_put_all_codec.py | 6 +- .../codec/replicated_map_put_codec.py | 6 +- .../codec/replicated_map_remove_codec.py | 6 +- ...licated_map_remove_entry_listener_codec.py | 7 +- .../codec/replicated_map_size_codec.py | 7 +- .../codec/replicated_map_values_codec.py | 6 +- .../codec/ringbuffer_add_all_codec.py | 7 +- .../protocol/codec/ringbuffer_add_codec.py | 7 +- .../codec/ringbuffer_capacity_codec.py | 7 +- .../codec/ringbuffer_head_sequence_codec.py | 7 +- .../codec/ringbuffer_read_many_codec.py | 15 +--- .../codec/ringbuffer_read_one_codec.py | 6 +- .../ringbuffer_remaining_capacity_codec.py | 7 +- .../protocol/codec/ringbuffer_size_codec.py | 7 +- .../codec/ringbuffer_tail_sequence_codec.py | 7 +- .../protocol/codec/semaphore_acquire_codec.py | 7 +- .../semaphore_available_permits_codec.py | 7 +- .../protocol/codec/semaphore_change_codec.py | 7 +- .../protocol/codec/semaphore_drain_codec.py | 7 +- .../semaphore_get_semaphore_type_codec.py | 7 +- .../protocol/codec/semaphore_init_codec.py | 7 +- .../protocol/codec/semaphore_release_codec.py | 7 +- hazelcast/protocol/codec/set_add_all_codec.py | 7 +- hazelcast/protocol/codec/set_add_codec.py | 7 +- .../protocol/codec/set_add_listener_codec.py | 8 +- hazelcast/protocol/codec/set_clear_codec.py | 6 +- .../codec/set_compare_and_remove_all_codec.py | 7 +- .../codec/set_compare_and_retain_all_codec.py | 7 +- .../protocol/codec/set_contains_all_codec.py | 7 +- .../protocol/codec/set_contains_codec.py | 7 +- hazelcast/protocol/codec/set_get_all_codec.py | 6 +- .../protocol/codec/set_is_empty_codec.py | 7 +- hazelcast/protocol/codec/set_remove_codec.py | 7 +- .../codec/set_remove_listener_codec.py | 7 +- hazelcast/protocol/codec/set_size_codec.py | 7 +- .../codec/topic_add_message_listener_codec.py | 12 +-- .../protocol/codec/topic_publish_codec.py | 6 +- .../topic_remove_message_listener_codec.py | 7 +- .../codec/transaction_commit_codec.py | 6 +- .../codec/transaction_create_codec.py | 7 +- .../codec/transaction_rollback_codec.py | 6 +- .../codec/transactional_list_add_codec.py | 7 +- .../codec/transactional_list_remove_codec.py | 7 +- .../codec/transactional_list_size_codec.py | 7 +- .../transactional_map_contains_key_codec.py | 7 +- .../transactional_map_contains_value_codec.py | 7 +- .../codec/transactional_map_delete_codec.py | 6 +- .../codec/transactional_map_get_codec.py | 6 +- .../transactional_map_get_for_update_codec.py | 6 +- .../codec/transactional_map_is_empty_codec.py | 7 +- .../codec/transactional_map_key_set_codec.py | 6 +- ...tional_map_key_set_with_predicate_codec.py | 6 +- .../codec/transactional_map_put_codec.py | 6 +- .../transactional_map_put_if_absent_codec.py | 6 +- .../codec/transactional_map_remove_codec.py | 6 +- .../transactional_map_remove_if_same_codec.py | 7 +- .../codec/transactional_map_replace_codec.py | 6 +- ...transactional_map_replace_if_same_codec.py | 7 +- .../codec/transactional_map_set_codec.py | 6 +- .../codec/transactional_map_size_codec.py | 7 +- .../codec/transactional_map_values_codec.py | 6 +- ...ctional_map_values_with_predicate_codec.py | 6 +- .../transactional_multi_map_get_codec.py | 6 +- .../transactional_multi_map_put_codec.py | 7 +- .../transactional_multi_map_remove_codec.py | 6 +- ...nsactional_multi_map_remove_entry_codec.py | 7 +- .../transactional_multi_map_size_codec.py | 7 +- ...ansactional_multi_map_value_count_codec.py | 7 +- .../codec/transactional_queue_offer_codec.py | 7 +- .../codec/transactional_queue_peek_codec.py | 6 +- .../codec/transactional_queue_poll_codec.py | 6 +- .../codec/transactional_queue_size_codec.py | 7 +- .../codec/transactional_queue_take_codec.py | 6 +- .../codec/transactional_set_add_codec.py | 7 +- .../codec/transactional_set_remove_codec.py | 7 +- .../codec/transactional_set_size_codec.py | 7 +- pyproject.toml | 1 + 285 files changed, 415 insertions(+), 2036 deletions(-) diff --git a/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py b/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py index 97683a67d9..fa9bd8ed19 100644 --- a/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py +++ b/hazelcast/protocol/codec/atomic_long_add_and_get_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_alter_codec.py b/hazelcast/protocol/codec/atomic_long_alter_codec.py index 58cf630c0a..d732af1574 100644 --- a/hazelcast/protocol/codec/atomic_long_alter_codec.py +++ b/hazelcast/protocol/codec/atomic_long_alter_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_long_apply_codec.py b/hazelcast/protocol/codec/atomic_long_apply_codec.py index d40483e79c..27d1894622 100644 --- a/hazelcast/protocol/codec/atomic_long_apply_codec.py +++ b/hazelcast/protocol/codec/atomic_long_apply_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py b/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py index 1ed415fc5a..5e7a7138e1 100644 --- a/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py +++ b/hazelcast/protocol/codec/atomic_long_compare_and_set_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py b/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py index 39161b090a..6c5a6cd0d4 100644 --- a/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py +++ b/hazelcast/protocol/codec/atomic_long_get_and_add_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py b/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py index 7603277aee..6926a98f03 100644 --- a/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py +++ b/hazelcast/protocol/codec/atomic_long_get_and_set_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_long_get_codec.py b/hazelcast/protocol/codec/atomic_long_get_codec.py index 9ecc806c06..832a8b4045 100644 --- a/hazelcast/protocol/codec/atomic_long_get_codec.py +++ b/hazelcast/protocol/codec/atomic_long_get_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/atomic_ref_apply_codec.py b/hazelcast/protocol/codec/atomic_ref_apply_codec.py index 9207ccbc5b..45780714f0 100644 --- a/hazelcast/protocol/codec/atomic_ref_apply_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_apply_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py b/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py index 40920cf1df..1e91ef8c95 100644 --- a/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_compare_and_set_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_contains_codec.py b/hazelcast/protocol/codec/atomic_ref_contains_codec.py index 6a61fb0b96..b0e9ae1e19 100644 --- a/hazelcast/protocol/codec/atomic_ref_contains_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_contains_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_get_codec.py b/hazelcast/protocol/codec/atomic_ref_get_codec.py index 19c5392e3d..fc0786affb 100644 --- a/hazelcast/protocol/codec/atomic_ref_get_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_get_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/atomic_ref_set_codec.py b/hazelcast/protocol/codec/atomic_ref_set_codec.py index 8add83798c..b10c9d120d 100644 --- a/hazelcast/protocol/codec/atomic_ref_set_codec.py +++ b/hazelcast/protocol/codec/atomic_ref_set_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py b/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py index 775f81c723..e4306ab338 100644 --- a/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py +++ b/hazelcast/protocol/codec/client_add_cluster_view_listener_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.codec.custom.member_info_codec import MemberInfoCodec from hazelcast.protocol.builtin import EntryListUUIDListIntegerCodec @@ -32,20 +27,13 @@ def handle(msg, handle_members_view_event=None, handle_partitions_view_event=Non message_type = msg.get_message_type() if message_type == _EVENT_MEMBERS_VIEW_MESSAGE_TYPE and handle_members_view_event is not None: initial_frame = msg.next_frame() - version = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_MEMBERS_VIEW_VERSION_OFFSET - ) + version = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_MEMBERS_VIEW_VERSION_OFFSET) member_infos = ListMultiFrameCodec.decode(msg, MemberInfoCodec.decode) handle_members_view_event(version, member_infos) return - if ( - message_type == _EVENT_PARTITIONS_VIEW_MESSAGE_TYPE - and handle_partitions_view_event is not None - ): + if message_type == _EVENT_PARTITIONS_VIEW_MESSAGE_TYPE and handle_partitions_view_event is not None: initial_frame = msg.next_frame() - version = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_PARTITIONS_VIEW_VERSION_OFFSET - ) + version = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_PARTITIONS_VIEW_VERSION_OFFSET) partitions = EntryListUUIDListIntegerCodec.decode(msg) handle_partitions_view_event(version, partitions) return diff --git a/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py b/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py index f008532067..50e22ee776 100644 --- a/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py +++ b/hazelcast/protocol/codec/client_add_distributed_object_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x000900 @@ -35,14 +29,9 @@ def decode_response(msg): def handle(msg, handle_distributed_object_event=None): message_type = msg.get_message_type() - if ( - message_type == _EVENT_DISTRIBUTED_OBJECT_MESSAGE_TYPE - and handle_distributed_object_event is not None - ): + if message_type == _EVENT_DISTRIBUTED_OBJECT_MESSAGE_TYPE and handle_distributed_object_event is not None: initial_frame = msg.next_frame() - source = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _EVENT_DISTRIBUTED_OBJECT_SOURCE_OFFSET - ) + source = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_DISTRIBUTED_OBJECT_SOURCE_OFFSET) name = StringCodec.decode(msg) service_name = StringCodec.decode(msg) event_type = StringCodec.decode(msg) diff --git a/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py b/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py index f28ac71189..0458a08d45 100644 --- a/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/client_add_partition_lost_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE # hex: 0x000600 _REQUEST_MESSAGE_TYPE = 1536 @@ -19,12 +13,8 @@ _REQUEST_INITIAL_FRAME_SIZE = _REQUEST_LOCAL_ONLY_OFFSET + BOOLEAN_SIZE_IN_BYTES _RESPONSE_RESPONSE_OFFSET = RESPONSE_HEADER_SIZE _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET = EVENT_HEADER_SIZE -_EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET = ( - _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES -) -_EVENT_PARTITION_LOST_SOURCE_OFFSET = ( - _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET + INT_SIZE_IN_BYTES -) +_EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET = _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES +_EVENT_PARTITION_LOST_SOURCE_OFFSET = _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET + INT_SIZE_IN_BYTES def encode_request(local_only): @@ -40,19 +30,10 @@ def decode_response(msg): def handle(msg, handle_partition_lost_event=None): message_type = msg.get_message_type() - if ( - message_type == _EVENT_PARTITION_LOST_MESSAGE_TYPE - and handle_partition_lost_event is not None - ): + if message_type == _EVENT_PARTITION_LOST_MESSAGE_TYPE and handle_partition_lost_event is not None: initial_frame = msg.next_frame() - partition_id = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET - ) - lost_backup_count = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET - ) - source = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _EVENT_PARTITION_LOST_SOURCE_OFFSET - ) + partition_id = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_PARTITION_LOST_PARTITION_ID_OFFSET) + lost_backup_count = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_PARTITION_LOST_LOST_BACKUP_COUNT_OFFSET) + source = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_PARTITION_LOST_SOURCE_OFFSET) handle_partition_lost_event(partition_id, lost_backup_count, source) return diff --git a/hazelcast/protocol/codec/client_authentication_codec.py b/hazelcast/protocol/codec/client_authentication_codec.py index cd3ea59982..e5a03ee477 100644 --- a/hazelcast/protocol/codec/client_authentication_codec.py +++ b/hazelcast/protocol/codec/client_authentication_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import CodecUtil from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -27,22 +22,10 @@ _RESPONSE_FAILOVER_SUPPORTED_OFFSET = _RESPONSE_CLUSTER_ID_OFFSET + UUID_SIZE_IN_BYTES -def encode_request( - cluster_name, - username, - password, - uuid, - client_type, - serialization_version, - client_hazelcast_version, - client_name, - labels, -): +def encode_request(cluster_name, username, password, uuid, client_type, serialization_version, client_hazelcast_version, client_name, labels): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) FixSizedTypesCodec.encode_uuid(buf, _REQUEST_UUID_OFFSET, uuid) - FixSizedTypesCodec.encode_byte( - buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version - ) + FixSizedTypesCodec.encode_byte(buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version) StringCodec.encode(buf, cluster_name) CodecUtil.encode_nullable(buf, username, StringCodec.encode) CodecUtil.encode_nullable(buf, password, StringCodec.encode) @@ -57,21 +40,11 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["status"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_STATUS_OFFSET) - response["member_uuid"] = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET - ) - response["serialization_version"] = FixSizedTypesCodec.decode_byte( - initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET - ) - response["partition_count"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET - ) - response["cluster_id"] = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET - ) - response["failover_supported"] = FixSizedTypesCodec.decode_boolean( - initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET - ) + response["member_uuid"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET) + response["serialization_version"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET) + response["partition_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET) + response["cluster_id"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET) + response["failover_supported"] = FixSizedTypesCodec.decode_boolean(initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET) response["address"] = CodecUtil.decode_nullable(msg, AddressCodec.decode) response["server_hazelcast_version"] = StringCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/client_authentication_custom_codec.py b/hazelcast/protocol/codec/client_authentication_custom_codec.py index 0ac1caa870..0332a1cb41 100644 --- a/hazelcast/protocol/codec/client_authentication_custom_codec.py +++ b/hazelcast/protocol/codec/client_authentication_custom_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ByteArrayCodec from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -28,21 +23,10 @@ _RESPONSE_FAILOVER_SUPPORTED_OFFSET = _RESPONSE_CLUSTER_ID_OFFSET + UUID_SIZE_IN_BYTES -def encode_request( - cluster_name, - credentials, - uuid, - client_type, - serialization_version, - client_hazelcast_version, - client_name, - labels, -): +def encode_request(cluster_name, credentials, uuid, client_type, serialization_version, client_hazelcast_version, client_name, labels): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) FixSizedTypesCodec.encode_uuid(buf, _REQUEST_UUID_OFFSET, uuid) - FixSizedTypesCodec.encode_byte( - buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version - ) + FixSizedTypesCodec.encode_byte(buf, _REQUEST_SERIALIZATION_VERSION_OFFSET, serialization_version) StringCodec.encode(buf, cluster_name) ByteArrayCodec.encode(buf, credentials) StringCodec.encode(buf, client_type) @@ -56,21 +40,11 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["status"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_STATUS_OFFSET) - response["member_uuid"] = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET - ) - response["serialization_version"] = FixSizedTypesCodec.decode_byte( - initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET - ) - response["partition_count"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET - ) - response["cluster_id"] = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET - ) - response["failover_supported"] = FixSizedTypesCodec.decode_boolean( - initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET - ) + response["member_uuid"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_MEMBER_UUID_OFFSET) + response["serialization_version"] = FixSizedTypesCodec.decode_byte(initial_frame.buf, _RESPONSE_SERIALIZATION_VERSION_OFFSET) + response["partition_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_PARTITION_COUNT_OFFSET) + response["cluster_id"] = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _RESPONSE_CLUSTER_ID_OFFSET) + response["failover_supported"] = FixSizedTypesCodec.decode_boolean(initial_frame.buf, _RESPONSE_FAILOVER_SUPPORTED_OFFSET) response["address"] = CodecUtil.decode_nullable(msg, AddressCodec.decode) response["server_hazelcast_version"] = StringCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/client_create_proxies_codec.py b/hazelcast/protocol/codec/client_create_proxies_codec.py index e97b0f79d3..159c9a29bc 100644 --- a/hazelcast/protocol/codec/client_create_proxies_codec.py +++ b/hazelcast/protocol/codec/client_create_proxies_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/client_create_proxy_codec.py b/hazelcast/protocol/codec/client_create_proxy_codec.py index 364a5f9b4d..c42a50cfbc 100644 --- a/hazelcast/protocol/codec/client_create_proxy_codec.py +++ b/hazelcast/protocol/codec/client_create_proxy_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x000400 diff --git a/hazelcast/protocol/codec/client_destroy_proxy_codec.py b/hazelcast/protocol/codec/client_destroy_proxy_codec.py index b8bb4acf63..0411a6d9b1 100644 --- a/hazelcast/protocol/codec/client_destroy_proxy_codec.py +++ b/hazelcast/protocol/codec/client_destroy_proxy_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x000500 diff --git a/hazelcast/protocol/codec/client_get_distributed_objects_codec.py b/hazelcast/protocol/codec/client_get_distributed_objects_codec.py index c225b807b0..53372171c9 100644 --- a/hazelcast/protocol/codec/client_get_distributed_objects_codec.py +++ b/hazelcast/protocol/codec/client_get_distributed_objects_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.codec.custom.distributed_object_info_codec import DistributedObjectInfoCodec diff --git a/hazelcast/protocol/codec/client_local_backup_listener_codec.py b/hazelcast/protocol/codec/client_local_backup_listener_codec.py index 87192c772d..1b0abe66cb 100644 --- a/hazelcast/protocol/codec/client_local_backup_listener_codec.py +++ b/hazelcast/protocol/codec/client_local_backup_listener_codec.py @@ -1,11 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE # hex: 0x000F00 _REQUEST_MESSAGE_TYPE = 3840 @@ -33,8 +27,6 @@ def handle(msg, handle_backup_event=None): message_type = msg.get_message_type() if message_type == _EVENT_BACKUP_MESSAGE_TYPE and handle_backup_event is not None: initial_frame = msg.next_frame() - source_invocation_correlation_id = FixSizedTypesCodec.decode_long( - initial_frame.buf, _EVENT_BACKUP_SOURCE_INVOCATION_CORRELATION_ID_OFFSET - ) + source_invocation_correlation_id = FixSizedTypesCodec.decode_long(initial_frame.buf, _EVENT_BACKUP_SOURCE_INVOCATION_CORRELATION_ID_OFFSET) handle_backup_event(source_invocation_correlation_id) return diff --git a/hazelcast/protocol/codec/client_ping_codec.py b/hazelcast/protocol/codec/client_ping_codec.py index caef0d6d59..ec596d4e58 100644 --- a/hazelcast/protocol/codec/client_ping_codec.py +++ b/hazelcast/protocol/codec/client_ping_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer # hex: 0x000B00 _REQUEST_MESSAGE_TYPE = 2816 diff --git a/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py b/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py index 8c4bf67b04..ec60c3cb30 100644 --- a/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py +++ b/hazelcast/protocol/codec/client_remove_distributed_object_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE # hex: 0x000A00 _REQUEST_MESSAGE_TYPE = 2560 diff --git a/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py b/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py index 1c4ef72b19..4a783d24d4 100644 --- a/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/client_remove_partition_lost_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE # hex: 0x000700 _REQUEST_MESSAGE_TYPE = 1792 diff --git a/hazelcast/protocol/codec/client_statistics_codec.py b/hazelcast/protocol/codec/client_statistics_codec.py index 86c8563b41..0f39fc4a5e 100644 --- a/hazelcast/protocol/codec/client_statistics_codec.py +++ b/hazelcast/protocol/codec/client_statistics_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ByteArrayCodec diff --git a/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py b/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py index f048c95068..629ad67f67 100644 --- a/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py +++ b/hazelcast/protocol/codec/client_trigger_partition_assignment_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer # hex: 0x001000 _REQUEST_MESSAGE_TYPE = 4096 diff --git a/hazelcast/protocol/codec/count_down_latch_await_codec.py b/hazelcast/protocol/codec/count_down_latch_await_codec.py index 0962a0e5f2..756a6183ae 100644 --- a/hazelcast/protocol/codec/count_down_latch_await_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_await_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_count_down_codec.py b/hazelcast/protocol/codec/count_down_latch_count_down_codec.py index 009611d552..0aef6a905d 100644 --- a/hazelcast/protocol/codec/count_down_latch_count_down_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_count_down_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_get_count_codec.py b/hazelcast/protocol/codec/count_down_latch_get_count_codec.py index 298661365b..35452273f3 100644 --- a/hazelcast/protocol/codec/count_down_latch_get_count_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_get_count_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_get_round_codec.py b/hazelcast/protocol/codec/count_down_latch_get_round_codec.py index 1c6869fa3e..df7f0a5559 100644 --- a/hazelcast/protocol/codec/count_down_latch_get_round_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_get_round_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py b/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py index 1e340394ad..bcbc2ae351 100644 --- a/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py +++ b/hazelcast/protocol/codec/count_down_latch_try_set_count_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py b/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py index c83f4d2957..fde33f98c5 100644 --- a/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py +++ b/hazelcast/protocol/codec/cp_group_create_cp_group_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec diff --git a/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py b/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py index bba9845006..d166c0e5b1 100644 --- a/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py +++ b/hazelcast/protocol/codec/cp_group_destroy_cp_object_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/cp_session_close_session_codec.py b/hazelcast/protocol/codec/cp_session_close_session_codec.py index c15074ca9f..37ed4a11fd 100644 --- a/hazelcast/protocol/codec/cp_session_close_session_codec.py +++ b/hazelcast/protocol/codec/cp_session_close_session_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec # hex: 0x1F0200 diff --git a/hazelcast/protocol/codec/cp_session_create_session_codec.py b/hazelcast/protocol/codec/cp_session_create_session_codec.py index bc2cba9413..829d9bb0b1 100644 --- a/hazelcast/protocol/codec/cp_session_create_session_codec.py +++ b/hazelcast/protocol/codec/cp_session_create_session_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec @@ -30,13 +25,7 @@ def encode_request(group_id, endpoint_name): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["session_id"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET - ) - response["ttl_millis"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_TTL_MILLIS_OFFSET - ) - response["heartbeat_millis"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_HEARTBEAT_MILLIS_OFFSET - ) + response["session_id"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET) + response["ttl_millis"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_TTL_MILLIS_OFFSET) + response["heartbeat_millis"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_HEARTBEAT_MILLIS_OFFSET) return response diff --git a/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py b/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py index f605d64eb7..3afc3f9f02 100644 --- a/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py +++ b/hazelcast/protocol/codec/cp_session_generate_thread_id_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec # hex: 0x1F0400 diff --git a/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py b/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py index 47347cd48f..4e29060584 100644 --- a/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py +++ b/hazelcast/protocol/codec/cp_session_heartbeat_session_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec # hex: 0x1F0300 diff --git a/hazelcast/protocol/codec/custom/address_codec.py b/hazelcast/protocol/codec/custom/address_codec.py index dfbde89852..b7e2710bf1 100644 --- a/hazelcast/protocol/codec/custom/address_codec.py +++ b/hazelcast/protocol/codec/custom/address_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.core import Address from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py b/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py index a2d2930204..da926daaab 100644 --- a/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py +++ b/hazelcast/protocol/codec/custom/anchor_data_list_holder_codec.py @@ -11,9 +11,7 @@ class AnchorDataListHolderCodec(object): def encode(buf, anchor_data_list_holder, is_final=False): buf.extend(BEGIN_FRAME_BUF) ListIntegerCodec.encode(buf, anchor_data_list_holder.anchor_page_list) - EntryListCodec.encode( - buf, anchor_data_list_holder.anchor_data_list, DataCodec.encode, DataCodec.encode - ) + EntryListCodec.encode(buf, anchor_data_list_holder.anchor_data_list, DataCodec.encode, DataCodec.encode) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: diff --git a/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py b/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py index ddcfdf32f7..d356553d6b 100644 --- a/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py +++ b/hazelcast/protocol/codec/custom/bitmap_index_options_codec.py @@ -1,32 +1,19 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.config import BitmapIndexOptions from hazelcast.protocol.builtin import StringCodec _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS _UNIQUE_KEY_TRANSFORMATION_DECODE_OFFSET = 0 -_INITIAL_FRAME_SIZE = ( - _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET - + INT_SIZE_IN_BYTES - - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS -) +_INITIAL_FRAME_SIZE = _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS class BitmapIndexOptionsCodec(object): @staticmethod def encode(buf, bitmap_index_options, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int( - initial_frame_buf, - _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET, - bitmap_index_options.unique_key_transformation, - ) + FixSizedTypesCodec.encode_int(initial_frame_buf, _UNIQUE_KEY_TRANSFORMATION_ENCODE_OFFSET, bitmap_index_options.unique_key_transformation) buf.extend(initial_frame_buf) StringCodec.encode(buf, bitmap_index_options.unique_key) if is_final: @@ -38,9 +25,7 @@ def encode(buf, bitmap_index_options, is_final=False): def decode(msg): msg.next_frame() initial_frame = msg.next_frame() - unique_key_transformation = FixSizedTypesCodec.decode_int( - initial_frame.buf, _UNIQUE_KEY_TRANSFORMATION_DECODE_OFFSET - ) + unique_key_transformation = FixSizedTypesCodec.decode_int(initial_frame.buf, _UNIQUE_KEY_TRANSFORMATION_DECODE_OFFSET) unique_key = StringCodec.decode(msg) CodecUtil.fast_forward_to_end_frame(msg) return BitmapIndexOptions(unique_key, unique_key_transformation) diff --git a/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py b/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py index 63b08d828e..591385da9d 100644 --- a/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py +++ b/hazelcast/protocol/codec/custom/endpoint_qualifier_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.protocol import EndpointQualifier from hazelcast.protocol.builtin import StringCodec @@ -18,9 +13,7 @@ class EndpointQualifierCodec(object): @staticmethod def encode(buf, endpoint_qualifier, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int( - initial_frame_buf, _TYPE_ENCODE_OFFSET, endpoint_qualifier.type - ) + FixSizedTypesCodec.encode_int(initial_frame_buf, _TYPE_ENCODE_OFFSET, endpoint_qualifier.type) buf.extend(initial_frame_buf) CodecUtil.encode_nullable(buf, endpoint_qualifier.identifier, StringCodec.encode) if is_final: diff --git a/hazelcast/protocol/codec/custom/error_holder_codec.py b/hazelcast/protocol/codec/custom/error_holder_codec.py index ab20bf7fa7..c3aeefd410 100644 --- a/hazelcast/protocol/codec/custom/error_holder_codec.py +++ b/hazelcast/protocol/codec/custom/error_holder_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.protocol import ErrorHolder from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -13,24 +8,18 @@ _ERROR_CODE_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS _ERROR_CODE_DECODE_OFFSET = 0 -_INITIAL_FRAME_SIZE = ( - _ERROR_CODE_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS -) +_INITIAL_FRAME_SIZE = _ERROR_CODE_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS class ErrorHolderCodec(object): @staticmethod def encode(buf, error_holder, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int( - initial_frame_buf, _ERROR_CODE_ENCODE_OFFSET, error_holder.error_code - ) + FixSizedTypesCodec.encode_int(initial_frame_buf, _ERROR_CODE_ENCODE_OFFSET, error_holder.error_code) buf.extend(initial_frame_buf) StringCodec.encode(buf, error_holder.class_name) CodecUtil.encode_nullable(buf, error_holder.message, StringCodec.encode) - ListMultiFrameCodec.encode( - buf, error_holder.stack_trace_elements, StackTraceElementCodec.encode - ) + ListMultiFrameCodec.encode(buf, error_holder.stack_trace_elements, StackTraceElementCodec.encode) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: diff --git a/hazelcast/protocol/codec/custom/index_config_codec.py b/hazelcast/protocol/codec/custom/index_config_codec.py index 74f5745d01..fe4d9cdff4 100644 --- a/hazelcast/protocol/codec/custom/index_config_codec.py +++ b/hazelcast/protocol/codec/custom/index_config_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.config import IndexConfig from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec @@ -24,9 +19,7 @@ def encode(buf, index_config, is_final=False): buf.extend(initial_frame_buf) CodecUtil.encode_nullable(buf, index_config.name, StringCodec.encode) ListMultiFrameCodec.encode(buf, index_config.attributes, StringCodec.encode) - CodecUtil.encode_nullable( - buf, index_config.bitmap_index_options, BitmapIndexOptionsCodec.encode - ) + CodecUtil.encode_nullable(buf, index_config.bitmap_index_options, BitmapIndexOptionsCodec.encode) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: diff --git a/hazelcast/protocol/codec/custom/member_info_codec.py b/hazelcast/protocol/codec/custom/member_info_codec.py index 1db53a802a..3777ef5ead 100644 --- a/hazelcast/protocol/codec/custom/member_info_codec.py +++ b/hazelcast/protocol/codec/custom/member_info_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.core import MemberInfo from hazelcast.protocol.codec.custom.address_codec import AddressCodec from hazelcast.protocol.builtin import MapCodec @@ -17,9 +12,7 @@ _UUID_DECODE_OFFSET = 0 _LITE_MEMBER_ENCODE_OFFSET = _UUID_ENCODE_OFFSET + UUID_SIZE_IN_BYTES _LITE_MEMBER_DECODE_OFFSET = _UUID_DECODE_OFFSET + UUID_SIZE_IN_BYTES -_INITIAL_FRAME_SIZE = ( - _LITE_MEMBER_ENCODE_OFFSET + BOOLEAN_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS -) +_INITIAL_FRAME_SIZE = _LITE_MEMBER_ENCODE_OFFSET + BOOLEAN_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS class MemberInfoCodec(object): @@ -27,16 +20,12 @@ class MemberInfoCodec(object): def encode(buf, member_info, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) FixSizedTypesCodec.encode_uuid(initial_frame_buf, _UUID_ENCODE_OFFSET, member_info.uuid) - FixSizedTypesCodec.encode_boolean( - initial_frame_buf, _LITE_MEMBER_ENCODE_OFFSET, member_info.lite_member - ) + FixSizedTypesCodec.encode_boolean(initial_frame_buf, _LITE_MEMBER_ENCODE_OFFSET, member_info.lite_member) buf.extend(initial_frame_buf) AddressCodec.encode(buf, member_info.address) MapCodec.encode(buf, member_info.attributes, StringCodec.encode, StringCodec.encode) MemberVersionCodec.encode(buf, member_info.version) - MapCodec.encode( - buf, member_info.address_map, EndpointQualifierCodec.encode, AddressCodec.encode - ) + MapCodec.encode(buf, member_info.address_map, EndpointQualifierCodec.encode, AddressCodec.encode) if is_final: buf.extend(END_FINAL_FRAME_BUF) else: @@ -47,9 +36,7 @@ def decode(msg): msg.next_frame() initial_frame = msg.next_frame() uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _UUID_DECODE_OFFSET) - lite_member = FixSizedTypesCodec.decode_boolean( - initial_frame.buf, _LITE_MEMBER_DECODE_OFFSET - ) + lite_member = FixSizedTypesCodec.decode_boolean(initial_frame.buf, _LITE_MEMBER_DECODE_OFFSET) address = AddressCodec.decode(msg) attributes = MapCodec.decode(msg, StringCodec.decode, StringCodec.decode) version = MemberVersionCodec.decode(msg) @@ -59,6 +46,4 @@ def decode(msg): address_map = MapCodec.decode(msg, EndpointQualifierCodec.decode, AddressCodec.decode) is_address_map_exists = True CodecUtil.fast_forward_to_end_frame(msg) - return MemberInfo( - address, uuid, attributes, lite_member, version, is_address_map_exists, address_map - ) + return MemberInfo(address, uuid, attributes, lite_member, version, is_address_map_exists, address_map) diff --git a/hazelcast/protocol/codec/custom/member_version_codec.py b/hazelcast/protocol/codec/custom/member_version_codec.py index b2795e82cc..6f45ca6f22 100644 --- a/hazelcast/protocol/codec/custom/member_version_codec.py +++ b/hazelcast/protocol/codec/custom/member_version_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.core import MemberVersion _MAJOR_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS @@ -21,15 +16,9 @@ class MemberVersionCodec(object): @staticmethod def encode(buf, member_version, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_byte( - initial_frame_buf, _MAJOR_ENCODE_OFFSET, member_version.major - ) - FixSizedTypesCodec.encode_byte( - initial_frame_buf, _MINOR_ENCODE_OFFSET, member_version.minor - ) - FixSizedTypesCodec.encode_byte( - initial_frame_buf, _PATCH_ENCODE_OFFSET, member_version.patch - ) + FixSizedTypesCodec.encode_byte(initial_frame_buf, _MAJOR_ENCODE_OFFSET, member_version.major) + FixSizedTypesCodec.encode_byte(initial_frame_buf, _MINOR_ENCODE_OFFSET, member_version.minor) + FixSizedTypesCodec.encode_byte(initial_frame_buf, _PATCH_ENCODE_OFFSET, member_version.patch) buf.extend(initial_frame_buf) if is_final: buf.extend(END_FINAL_FRAME_BUF) diff --git a/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py b/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py index 302a5e8b0e..bfa4eae46e 100644 --- a/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py +++ b/hazelcast/protocol/codec/custom/paging_predicate_holder_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.protocol import PagingPredicateHolder from hazelcast.protocol.codec.custom.anchor_data_list_holder_codec import AnchorDataListHolderCodec from hazelcast.protocol.builtin import DataCodec @@ -16,26 +11,16 @@ _PAGE_DECODE_OFFSET = _PAGE_SIZE_DECODE_OFFSET + INT_SIZE_IN_BYTES _ITERATION_TYPE_ID_ENCODE_OFFSET = _PAGE_ENCODE_OFFSET + INT_SIZE_IN_BYTES _ITERATION_TYPE_ID_DECODE_OFFSET = _PAGE_DECODE_OFFSET + INT_SIZE_IN_BYTES -_INITIAL_FRAME_SIZE = ( - _ITERATION_TYPE_ID_ENCODE_OFFSET + BYTE_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS -) +_INITIAL_FRAME_SIZE = _ITERATION_TYPE_ID_ENCODE_OFFSET + BYTE_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS class PagingPredicateHolderCodec(object): @staticmethod def encode(buf, paging_predicate_holder, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int( - initial_frame_buf, _PAGE_SIZE_ENCODE_OFFSET, paging_predicate_holder.page_size - ) - FixSizedTypesCodec.encode_int( - initial_frame_buf, _PAGE_ENCODE_OFFSET, paging_predicate_holder.page - ) - FixSizedTypesCodec.encode_byte( - initial_frame_buf, - _ITERATION_TYPE_ID_ENCODE_OFFSET, - paging_predicate_holder.iteration_type_id, - ) + FixSizedTypesCodec.encode_int(initial_frame_buf, _PAGE_SIZE_ENCODE_OFFSET, paging_predicate_holder.page_size) + FixSizedTypesCodec.encode_int(initial_frame_buf, _PAGE_ENCODE_OFFSET, paging_predicate_holder.page) + FixSizedTypesCodec.encode_byte(initial_frame_buf, _ITERATION_TYPE_ID_ENCODE_OFFSET, paging_predicate_holder.iteration_type_id) buf.extend(initial_frame_buf) AnchorDataListHolderCodec.encode(buf, paging_predicate_holder.anchor_data_list_holder) CodecUtil.encode_nullable(buf, paging_predicate_holder.predicate_data, DataCodec.encode) @@ -52,20 +37,10 @@ def decode(msg): initial_frame = msg.next_frame() page_size = FixSizedTypesCodec.decode_int(initial_frame.buf, _PAGE_SIZE_DECODE_OFFSET) page = FixSizedTypesCodec.decode_int(initial_frame.buf, _PAGE_DECODE_OFFSET) - iteration_type_id = FixSizedTypesCodec.decode_byte( - initial_frame.buf, _ITERATION_TYPE_ID_DECODE_OFFSET - ) + iteration_type_id = FixSizedTypesCodec.decode_byte(initial_frame.buf, _ITERATION_TYPE_ID_DECODE_OFFSET) anchor_data_list_holder = AnchorDataListHolderCodec.decode(msg) predicate_data = CodecUtil.decode_nullable(msg, DataCodec.decode) comparator_data = CodecUtil.decode_nullable(msg, DataCodec.decode) partition_key_data = CodecUtil.decode_nullable(msg, DataCodec.decode) CodecUtil.fast_forward_to_end_frame(msg) - return PagingPredicateHolder( - anchor_data_list_holder, - predicate_data, - comparator_data, - page_size, - page, - iteration_type_id, - partition_key_data, - ) + return PagingPredicateHolder(anchor_data_list_holder, predicate_data, comparator_data, page_size, page, iteration_type_id, partition_key_data) diff --git a/hazelcast/protocol/codec/custom/raft_group_id_codec.py b/hazelcast/protocol/codec/custom/raft_group_id_codec.py index a9d5cc058b..760129d0fb 100644 --- a/hazelcast/protocol/codec/custom/raft_group_id_codec.py +++ b/hazelcast/protocol/codec/custom/raft_group_id_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.protocol import RaftGroupId from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/custom/simple_entry_view_codec.py b/hazelcast/protocol/codec/custom/simple_entry_view_codec.py index 6648fadd59..8174330941 100644 --- a/hazelcast/protocol/codec/custom/simple_entry_view_codec.py +++ b/hazelcast/protocol/codec/custom/simple_entry_view_codec.py @@ -1,11 +1,6 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.core import SimpleEntryView from hazelcast.protocol.builtin import DataCodec @@ -29,43 +24,23 @@ _TTL_DECODE_OFFSET = _VERSION_DECODE_OFFSET + LONG_SIZE_IN_BYTES _MAX_IDLE_ENCODE_OFFSET = _TTL_ENCODE_OFFSET + LONG_SIZE_IN_BYTES _MAX_IDLE_DECODE_OFFSET = _TTL_DECODE_OFFSET + LONG_SIZE_IN_BYTES -_INITIAL_FRAME_SIZE = ( - _MAX_IDLE_ENCODE_OFFSET + LONG_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS -) +_INITIAL_FRAME_SIZE = _MAX_IDLE_ENCODE_OFFSET + LONG_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS class SimpleEntryViewCodec(object): @staticmethod def encode(buf, simple_entry_view, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _COST_ENCODE_OFFSET, simple_entry_view.cost - ) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _CREATION_TIME_ENCODE_OFFSET, simple_entry_view.creation_time - ) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _EXPIRATION_TIME_ENCODE_OFFSET, simple_entry_view.expiration_time - ) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _HITS_ENCODE_OFFSET, simple_entry_view.hits - ) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _LAST_ACCESS_TIME_ENCODE_OFFSET, simple_entry_view.last_access_time - ) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _LAST_STORED_TIME_ENCODE_OFFSET, simple_entry_view.last_stored_time - ) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _LAST_UPDATE_TIME_ENCODE_OFFSET, simple_entry_view.last_update_time - ) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _VERSION_ENCODE_OFFSET, simple_entry_view.version - ) + FixSizedTypesCodec.encode_long(initial_frame_buf, _COST_ENCODE_OFFSET, simple_entry_view.cost) + FixSizedTypesCodec.encode_long(initial_frame_buf, _CREATION_TIME_ENCODE_OFFSET, simple_entry_view.creation_time) + FixSizedTypesCodec.encode_long(initial_frame_buf, _EXPIRATION_TIME_ENCODE_OFFSET, simple_entry_view.expiration_time) + FixSizedTypesCodec.encode_long(initial_frame_buf, _HITS_ENCODE_OFFSET, simple_entry_view.hits) + FixSizedTypesCodec.encode_long(initial_frame_buf, _LAST_ACCESS_TIME_ENCODE_OFFSET, simple_entry_view.last_access_time) + FixSizedTypesCodec.encode_long(initial_frame_buf, _LAST_STORED_TIME_ENCODE_OFFSET, simple_entry_view.last_stored_time) + FixSizedTypesCodec.encode_long(initial_frame_buf, _LAST_UPDATE_TIME_ENCODE_OFFSET, simple_entry_view.last_update_time) + FixSizedTypesCodec.encode_long(initial_frame_buf, _VERSION_ENCODE_OFFSET, simple_entry_view.version) FixSizedTypesCodec.encode_long(initial_frame_buf, _TTL_ENCODE_OFFSET, simple_entry_view.ttl) - FixSizedTypesCodec.encode_long( - initial_frame_buf, _MAX_IDLE_ENCODE_OFFSET, simple_entry_view.max_idle - ) + FixSizedTypesCodec.encode_long(initial_frame_buf, _MAX_IDLE_ENCODE_OFFSET, simple_entry_view.max_idle) buf.extend(initial_frame_buf) DataCodec.encode(buf, simple_entry_view.key) DataCodec.encode(buf, simple_entry_view.value) @@ -79,39 +54,16 @@ def decode(msg): msg.next_frame() initial_frame = msg.next_frame() cost = FixSizedTypesCodec.decode_long(initial_frame.buf, _COST_DECODE_OFFSET) - creation_time = FixSizedTypesCodec.decode_long( - initial_frame.buf, _CREATION_TIME_DECODE_OFFSET - ) - expiration_time = FixSizedTypesCodec.decode_long( - initial_frame.buf, _EXPIRATION_TIME_DECODE_OFFSET - ) + creation_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _CREATION_TIME_DECODE_OFFSET) + expiration_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _EXPIRATION_TIME_DECODE_OFFSET) hits = FixSizedTypesCodec.decode_long(initial_frame.buf, _HITS_DECODE_OFFSET) - last_access_time = FixSizedTypesCodec.decode_long( - initial_frame.buf, _LAST_ACCESS_TIME_DECODE_OFFSET - ) - last_stored_time = FixSizedTypesCodec.decode_long( - initial_frame.buf, _LAST_STORED_TIME_DECODE_OFFSET - ) - last_update_time = FixSizedTypesCodec.decode_long( - initial_frame.buf, _LAST_UPDATE_TIME_DECODE_OFFSET - ) + last_access_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _LAST_ACCESS_TIME_DECODE_OFFSET) + last_stored_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _LAST_STORED_TIME_DECODE_OFFSET) + last_update_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _LAST_UPDATE_TIME_DECODE_OFFSET) version = FixSizedTypesCodec.decode_long(initial_frame.buf, _VERSION_DECODE_OFFSET) ttl = FixSizedTypesCodec.decode_long(initial_frame.buf, _TTL_DECODE_OFFSET) max_idle = FixSizedTypesCodec.decode_long(initial_frame.buf, _MAX_IDLE_DECODE_OFFSET) key = DataCodec.decode(msg) value = DataCodec.decode(msg) CodecUtil.fast_forward_to_end_frame(msg) - return SimpleEntryView( - key, - value, - cost, - creation_time, - expiration_time, - hits, - last_access_time, - last_stored_time, - last_update_time, - version, - ttl, - max_idle, - ) + return SimpleEntryView(key, value, cost, creation_time, expiration_time, hits, last_access_time, last_stored_time, last_update_time, version, ttl, max_idle) diff --git a/hazelcast/protocol/codec/custom/stack_trace_element_codec.py b/hazelcast/protocol/codec/custom/stack_trace_element_codec.py index 3156a37f3f..fd72863637 100644 --- a/hazelcast/protocol/codec/custom/stack_trace_element_codec.py +++ b/hazelcast/protocol/codec/custom/stack_trace_element_codec.py @@ -1,28 +1,19 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil from hazelcast.serialization.bits import * -from hazelcast.protocol.client_message import ( - END_FRAME_BUF, - END_FINAL_FRAME_BUF, - SIZE_OF_FRAME_LENGTH_AND_FLAGS, - create_initial_buffer_custom, -) +from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom from hazelcast.protocol import StackTraceElement from hazelcast.protocol.builtin import StringCodec _LINE_NUMBER_ENCODE_OFFSET = 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS _LINE_NUMBER_DECODE_OFFSET = 0 -_INITIAL_FRAME_SIZE = ( - _LINE_NUMBER_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS -) +_INITIAL_FRAME_SIZE = _LINE_NUMBER_ENCODE_OFFSET + INT_SIZE_IN_BYTES - 2 * SIZE_OF_FRAME_LENGTH_AND_FLAGS class StackTraceElementCodec(object): @staticmethod def encode(buf, stack_trace_element, is_final=False): initial_frame_buf = create_initial_buffer_custom(_INITIAL_FRAME_SIZE) - FixSizedTypesCodec.encode_int( - initial_frame_buf, _LINE_NUMBER_ENCODE_OFFSET, stack_trace_element.line_number - ) + FixSizedTypesCodec.encode_int(initial_frame_buf, _LINE_NUMBER_ENCODE_OFFSET, stack_trace_element.line_number) buf.extend(initial_frame_buf) StringCodec.encode(buf, stack_trace_element.class_name) StringCodec.encode(buf, stack_trace_element.method_name) diff --git a/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py b/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py index 22ccf51a74..b51bc15cfc 100644 --- a/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py +++ b/hazelcast/protocol/codec/executor_service_cancel_on_member_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE # hex: 0x080400 _REQUEST_MESSAGE_TYPE = 525312 diff --git a/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py b/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py index 6d93161fd4..db8c43daa6 100644 --- a/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py +++ b/hazelcast/protocol/codec/executor_service_cancel_on_partition_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE # hex: 0x080300 _REQUEST_MESSAGE_TYPE = 525056 diff --git a/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py b/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py index b6452f1970..49220ede8c 100644 --- a/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py +++ b/hazelcast/protocol/codec/executor_service_is_shutdown_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x080200 diff --git a/hazelcast/protocol/codec/executor_service_shutdown_codec.py b/hazelcast/protocol/codec/executor_service_shutdown_codec.py index 431caf7adc..1e3b4c7ca9 100644 --- a/hazelcast/protocol/codec/executor_service_shutdown_codec.py +++ b/hazelcast/protocol/codec/executor_service_shutdown_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x080100 diff --git a/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py b/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py index 30bff7f88b..4064bbf119 100644 --- a/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py +++ b/hazelcast/protocol/codec/executor_service_submit_to_member_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py b/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py index b2ac0b4f54..6fa1475c6d 100644 --- a/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py +++ b/hazelcast/protocol/codec/executor_service_submit_to_partition_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py b/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py index 36a45fb9cb..9a979d098d 100644 --- a/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_get_lock_ownership_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec @@ -32,13 +27,7 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["fence"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_FENCE_OFFSET) - response["lock_count"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_LOCK_COUNT_OFFSET - ) - response["session_id"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET - ) - response["thread_id"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_THREAD_ID_OFFSET - ) + response["lock_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_LOCK_COUNT_OFFSET) + response["session_id"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_SESSION_ID_OFFSET) + response["thread_id"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_THREAD_ID_OFFSET) return response diff --git a/hazelcast/protocol/codec/fenced_lock_lock_codec.py b/hazelcast/protocol/codec/fenced_lock_lock_codec.py index a847f6a2e2..bdb1f6137e 100644 --- a/hazelcast/protocol/codec/fenced_lock_lock_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_lock_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py b/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py index 0dc0738f35..39442503c1 100644 --- a/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_try_lock_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/fenced_lock_unlock_codec.py b/hazelcast/protocol/codec/fenced_lock_unlock_codec.py index 6c774be516..68215547ee 100644 --- a/hazelcast/protocol/codec/fenced_lock_unlock_codec.py +++ b/hazelcast/protocol/codec/fenced_lock_unlock_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py b/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py index 847df27146..bfef30ecce 100644 --- a/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py +++ b/hazelcast/protocol/codec/flake_id_generator_new_id_batch_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x1C0100 @@ -31,10 +26,6 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["base"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_BASE_OFFSET) - response["increment"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_INCREMENT_OFFSET - ) - response["batch_size"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_BATCH_SIZE_OFFSET - ) + response["increment"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_INCREMENT_OFFSET) + response["batch_size"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_BATCH_SIZE_OFFSET) return response diff --git a/hazelcast/protocol/codec/list_add_all_codec.py b/hazelcast/protocol/codec/list_add_all_codec.py index 92c4598071..3d4615f2d8 100644 --- a/hazelcast/protocol/codec/list_add_all_codec.py +++ b/hazelcast/protocol/codec/list_add_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_add_all_with_index_codec.py b/hazelcast/protocol/codec/list_add_all_with_index_codec.py index d43f38deef..50de235b13 100644 --- a/hazelcast/protocol/codec/list_add_all_with_index_codec.py +++ b/hazelcast/protocol/codec/list_add_all_with_index_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_add_codec.py b/hazelcast/protocol/codec/list_add_codec.py index 241f867cc7..00fcd85e95 100644 --- a/hazelcast/protocol/codec/list_add_codec.py +++ b/hazelcast/protocol/codec/list_add_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_add_listener_codec.py b/hazelcast/protocol/codec/list_add_listener_codec.py index a4581f88f2..7d4e4f489a 100644 --- a/hazelcast/protocol/codec/list_add_listener_codec.py +++ b/hazelcast/protocol/codec/list_add_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_add_with_index_codec.py b/hazelcast/protocol/codec/list_add_with_index_codec.py index e4ef84ad6c..93a5bfd48b 100644 --- a/hazelcast/protocol/codec/list_add_with_index_codec.py +++ b/hazelcast/protocol/codec/list_add_with_index_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_clear_codec.py b/hazelcast/protocol/codec/list_clear_codec.py index a7ef42e32b..a3d585ef44 100644 --- a/hazelcast/protocol/codec/list_clear_codec.py +++ b/hazelcast/protocol/codec/list_clear_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x050900 diff --git a/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py b/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py index b7bc073a97..4192a7b4e6 100644 --- a/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py +++ b/hazelcast/protocol/codec/list_compare_and_remove_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py b/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py index 055a5d41e7..197ce06e3c 100644 --- a/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py +++ b/hazelcast/protocol/codec/list_compare_and_retain_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_contains_all_codec.py b/hazelcast/protocol/codec/list_contains_all_codec.py index 11cc79b380..8cb5745b40 100644 --- a/hazelcast/protocol/codec/list_contains_all_codec.py +++ b/hazelcast/protocol/codec/list_contains_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_contains_codec.py b/hazelcast/protocol/codec/list_contains_codec.py index ccb6fce809..703e120c48 100644 --- a/hazelcast/protocol/codec/list_contains_codec.py +++ b/hazelcast/protocol/codec/list_contains_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_get_all_codec.py b/hazelcast/protocol/codec/list_get_all_codec.py index d5cbd2609f..b6da226ef2 100644 --- a/hazelcast/protocol/codec/list_get_all_codec.py +++ b/hazelcast/protocol/codec/list_get_all_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_get_codec.py b/hazelcast/protocol/codec/list_get_codec.py index bd8eb40d78..a3977ccb09 100644 --- a/hazelcast/protocol/codec/list_get_codec.py +++ b/hazelcast/protocol/codec/list_get_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_index_of_codec.py b/hazelcast/protocol/codec/list_index_of_codec.py index fc9ba0b286..f1cf60eb17 100644 --- a/hazelcast/protocol/codec/list_index_of_codec.py +++ b/hazelcast/protocol/codec/list_index_of_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_is_empty_codec.py b/hazelcast/protocol/codec/list_is_empty_codec.py index 8955ede1d4..8c7e971604 100644 --- a/hazelcast/protocol/codec/list_is_empty_codec.py +++ b/hazelcast/protocol/codec/list_is_empty_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x050D00 diff --git a/hazelcast/protocol/codec/list_iterator_codec.py b/hazelcast/protocol/codec/list_iterator_codec.py index 6b9eb23b6f..b3ad4c89ed 100644 --- a/hazelcast/protocol/codec/list_iterator_codec.py +++ b/hazelcast/protocol/codec/list_iterator_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_last_index_of_codec.py b/hazelcast/protocol/codec/list_last_index_of_codec.py index 798975b5be..8e400ed091 100644 --- a/hazelcast/protocol/codec/list_last_index_of_codec.py +++ b/hazelcast/protocol/codec/list_last_index_of_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_list_iterator_codec.py b/hazelcast/protocol/codec/list_list_iterator_codec.py index b7c51a8cfa..877afc25ae 100644 --- a/hazelcast/protocol/codec/list_list_iterator_codec.py +++ b/hazelcast/protocol/codec/list_list_iterator_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_remove_codec.py b/hazelcast/protocol/codec/list_remove_codec.py index ba90d35b5b..b141c55d25 100644 --- a/hazelcast/protocol/codec/list_remove_codec.py +++ b/hazelcast/protocol/codec/list_remove_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/list_remove_listener_codec.py b/hazelcast/protocol/codec/list_remove_listener_codec.py index 3cebc923eb..15273f453f 100644 --- a/hazelcast/protocol/codec/list_remove_listener_codec.py +++ b/hazelcast/protocol/codec/list_remove_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x050C00 diff --git a/hazelcast/protocol/codec/list_remove_with_index_codec.py b/hazelcast/protocol/codec/list_remove_with_index_codec.py index 9b2f9e4e26..5e664b535b 100644 --- a/hazelcast/protocol/codec/list_remove_with_index_codec.py +++ b/hazelcast/protocol/codec/list_remove_with_index_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_set_codec.py b/hazelcast/protocol/codec/list_set_codec.py index 467962bfbe..31cf007899 100644 --- a/hazelcast/protocol/codec/list_set_codec.py +++ b/hazelcast/protocol/codec/list_set_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/list_size_codec.py b/hazelcast/protocol/codec/list_size_codec.py index 091c5def74..5a4cfbfdf3 100644 --- a/hazelcast/protocol/codec/list_size_codec.py +++ b/hazelcast/protocol/codec/list_size_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x050100 diff --git a/hazelcast/protocol/codec/list_sub_codec.py b/hazelcast/protocol/codec/list_sub_codec.py index e24170c016..a16957b1c3 100644 --- a/hazelcast/protocol/codec/list_sub_codec.py +++ b/hazelcast/protocol/codec/list_sub_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_add_entry_listener_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_codec.py index a69404aec5..d14035cafd 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -46,18 +40,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py index f91dca8a24..91507bf516 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_to_key_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -47,18 +41,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py index 54b31cfa0c..9716eb69cc 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_to_key_with_predicate_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -48,18 +42,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py b/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py index 307752b486..727ddaa3e8 100644 --- a/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_add_entry_listener_with_predicate_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -47,18 +41,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/map_add_index_codec.py b/hazelcast/protocol/codec/map_add_index_codec.py index c1c08986d1..299df0cb2b 100644 --- a/hazelcast/protocol/codec/map_add_index_codec.py +++ b/hazelcast/protocol/codec/map_add_index_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.index_config_codec import IndexConfigCodec diff --git a/hazelcast/protocol/codec/map_add_interceptor_codec.py b/hazelcast/protocol/codec/map_add_interceptor_codec.py index 87ddda82ca..f996ec0939 100644 --- a/hazelcast/protocol/codec/map_add_interceptor_codec.py +++ b/hazelcast/protocol/codec/map_add_interceptor_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py b/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py index 1a1a599e2c..09c02ae5ed 100644 --- a/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py +++ b/hazelcast/protocol/codec/map_add_near_cache_invalidation_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -28,12 +22,8 @@ _REQUEST_INITIAL_FRAME_SIZE = _REQUEST_LOCAL_ONLY_OFFSET + BOOLEAN_SIZE_IN_BYTES _RESPONSE_RESPONSE_OFFSET = RESPONSE_HEADER_SIZE _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET = EVENT_HEADER_SIZE -_EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET = ( - _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET + UUID_SIZE_IN_BYTES -) -_EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET = ( - _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET + UUID_SIZE_IN_BYTES -) +_EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET = _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET + UUID_SIZE_IN_BYTES +_EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET = _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET + UUID_SIZE_IN_BYTES def encode_request(name, listener_flags, local_only): @@ -51,27 +41,15 @@ def decode_response(msg): def handle(msg, handle_i_map_invalidation_event=None, handle_i_map_batch_invalidation_event=None): message_type = msg.get_message_type() - if ( - message_type == _EVENT_I_MAP_INVALIDATION_MESSAGE_TYPE - and handle_i_map_invalidation_event is not None - ): + if message_type == _EVENT_I_MAP_INVALIDATION_MESSAGE_TYPE and handle_i_map_invalidation_event is not None: initial_frame = msg.next_frame() - source_uuid = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET - ) - partition_uuid = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET - ) - sequence = FixSizedTypesCodec.decode_long( - initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET - ) + source_uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SOURCE_UUID_OFFSET) + partition_uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_I_MAP_INVALIDATION_PARTITION_UUID_OFFSET) + sequence = FixSizedTypesCodec.decode_long(initial_frame.buf, _EVENT_I_MAP_INVALIDATION_SEQUENCE_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) handle_i_map_invalidation_event(key, source_uuid, partition_uuid, sequence) return - if ( - message_type == _EVENT_I_MAP_BATCH_INVALIDATION_MESSAGE_TYPE - and handle_i_map_batch_invalidation_event is not None - ): + if message_type == _EVENT_I_MAP_BATCH_INVALIDATION_MESSAGE_TYPE and handle_i_map_batch_invalidation_event is not None: msg.next_frame() keys = ListMultiFrameCodec.decode(msg, DataCodec.decode) source_uuids = ListUUIDCodec.decode(msg) diff --git a/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py b/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py index d444a7f9c8..d96f1f0b00 100644 --- a/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/map_add_partition_lost_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x011B00 @@ -20,9 +14,7 @@ _REQUEST_INITIAL_FRAME_SIZE = _REQUEST_LOCAL_ONLY_OFFSET + BOOLEAN_SIZE_IN_BYTES _RESPONSE_RESPONSE_OFFSET = RESPONSE_HEADER_SIZE _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET = EVENT_HEADER_SIZE -_EVENT_MAP_PARTITION_LOST_UUID_OFFSET = ( - _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES -) +_EVENT_MAP_PARTITION_LOST_UUID_OFFSET = _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET + INT_SIZE_IN_BYTES def encode_request(name, local_only): @@ -39,16 +31,9 @@ def decode_response(msg): def handle(msg, handle_map_partition_lost_event=None): message_type = msg.get_message_type() - if ( - message_type == _EVENT_MAP_PARTITION_LOST_MESSAGE_TYPE - and handle_map_partition_lost_event is not None - ): + if message_type == _EVENT_MAP_PARTITION_LOST_MESSAGE_TYPE and handle_map_partition_lost_event is not None: initial_frame = msg.next_frame() - partition_id = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET - ) - uuid = FixSizedTypesCodec.decode_uuid( - initial_frame.buf, _EVENT_MAP_PARTITION_LOST_UUID_OFFSET - ) + partition_id = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_MAP_PARTITION_LOST_PARTITION_ID_OFFSET) + uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_MAP_PARTITION_LOST_UUID_OFFSET) handle_map_partition_lost_event(partition_id, uuid) return diff --git a/hazelcast/protocol/codec/map_aggregate_codec.py b/hazelcast/protocol/codec/map_aggregate_codec.py index b533e55ec4..52c6273204 100644 --- a/hazelcast/protocol/codec/map_aggregate_codec.py +++ b/hazelcast/protocol/codec/map_aggregate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py b/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py index d909020362..1aff715f90 100644 --- a/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_aggregate_with_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_clear_codec.py b/hazelcast/protocol/codec/map_clear_codec.py index 74d00f8ba5..f7fbca6c21 100644 --- a/hazelcast/protocol/codec/map_clear_codec.py +++ b/hazelcast/protocol/codec/map_clear_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x012D00 diff --git a/hazelcast/protocol/codec/map_contains_key_codec.py b/hazelcast/protocol/codec/map_contains_key_codec.py index 112926d47e..114afe1b63 100644 --- a/hazelcast/protocol/codec/map_contains_key_codec.py +++ b/hazelcast/protocol/codec/map_contains_key_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_contains_value_codec.py b/hazelcast/protocol/codec/map_contains_value_codec.py index ed87adc5a3..8f3053b5cc 100644 --- a/hazelcast/protocol/codec/map_contains_value_codec.py +++ b/hazelcast/protocol/codec/map_contains_value_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_delete_codec.py b/hazelcast/protocol/codec/map_delete_codec.py index aea9870400..78c7ec16e4 100644 --- a/hazelcast/protocol/codec/map_delete_codec.py +++ b/hazelcast/protocol/codec/map_delete_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py b/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py index e84ea87c91..2cf3cf44d6 100644 --- a/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py +++ b/hazelcast/protocol/codec/map_entries_with_paging_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.paging_predicate_holder_codec import PagingPredicateHolderCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_entries_with_predicate_codec.py b/hazelcast/protocol/codec/map_entries_with_predicate_codec.py index cde703d7e5..5dd41fe868 100644 --- a/hazelcast/protocol/codec/map_entries_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_entries_with_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_entry_set_codec.py b/hazelcast/protocol/codec/map_entry_set_codec.py index b1fc753a80..72e490e143 100644 --- a/hazelcast/protocol/codec/map_entry_set_codec.py +++ b/hazelcast/protocol/codec/map_entry_set_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_event_journal_read_codec.py b/hazelcast/protocol/codec/map_event_journal_read_codec.py index f0232bb8da..55d3be0301 100644 --- a/hazelcast/protocol/codec/map_event_journal_read_codec.py +++ b/hazelcast/protocol/codec/map_event_journal_read_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -39,12 +34,8 @@ def encode_request(name, start_sequence, min_size, max_size, predicate, projecti def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["read_count"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET - ) - response["next_seq"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET - ) + response["read_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET) + response["next_seq"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET) response["items"] = ListMultiFrameCodec.decode(msg, DataCodec.decode) response["item_seqs"] = CodecUtil.decode_nullable(msg, LongArrayCodec.decode) return response diff --git a/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py b/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py index 957cf77d3d..dc85d17e3a 100644 --- a/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py +++ b/hazelcast/protocol/codec/map_event_journal_subscribe_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x014100 @@ -27,10 +22,6 @@ def encode_request(name): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["oldest_sequence"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_OLDEST_SEQUENCE_OFFSET - ) - response["newest_sequence"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_NEWEST_SEQUENCE_OFFSET - ) + response["oldest_sequence"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_OLDEST_SEQUENCE_OFFSET) + response["newest_sequence"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_NEWEST_SEQUENCE_OFFSET) return response diff --git a/hazelcast/protocol/codec/map_evict_all_codec.py b/hazelcast/protocol/codec/map_evict_all_codec.py index c2a26195a6..4fae1d34bc 100644 --- a/hazelcast/protocol/codec/map_evict_all_codec.py +++ b/hazelcast/protocol/codec/map_evict_all_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x011F00 diff --git a/hazelcast/protocol/codec/map_evict_codec.py b/hazelcast/protocol/codec/map_evict_codec.py index 2d859f4056..0e6f8a4af5 100644 --- a/hazelcast/protocol/codec/map_evict_codec.py +++ b/hazelcast/protocol/codec/map_evict_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py b/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py index 4f0ccf8c24..f2daf9e804 100644 --- a/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py +++ b/hazelcast/protocol/codec/map_execute_on_all_keys_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_execute_on_key_codec.py b/hazelcast/protocol/codec/map_execute_on_key_codec.py index 79097350d9..6697a14b0f 100644 --- a/hazelcast/protocol/codec/map_execute_on_key_codec.py +++ b/hazelcast/protocol/codec/map_execute_on_key_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_execute_on_keys_codec.py b/hazelcast/protocol/codec/map_execute_on_keys_codec.py index b3c862c867..e554558bb9 100644 --- a/hazelcast/protocol/codec/map_execute_on_keys_codec.py +++ b/hazelcast/protocol/codec/map_execute_on_keys_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_execute_with_predicate_codec.py b/hazelcast/protocol/codec/map_execute_with_predicate_codec.py index bc8860cfdf..4a54302b58 100644 --- a/hazelcast/protocol/codec/map_execute_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_execute_with_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import EntryListCodec diff --git a/hazelcast/protocol/codec/map_flush_codec.py b/hazelcast/protocol/codec/map_flush_codec.py index 733a097538..3ab3e8fc3e 100644 --- a/hazelcast/protocol/codec/map_flush_codec.py +++ b/hazelcast/protocol/codec/map_flush_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x010A00 diff --git a/hazelcast/protocol/codec/map_force_unlock_codec.py b/hazelcast/protocol/codec/map_force_unlock_codec.py index 59ff066c55..9dd6410282 100644 --- a/hazelcast/protocol/codec/map_force_unlock_codec.py +++ b/hazelcast/protocol/codec/map_force_unlock_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_get_all_codec.py b/hazelcast/protocol/codec/map_get_all_codec.py index 1a608fb516..2758d7249d 100644 --- a/hazelcast/protocol/codec/map_get_all_codec.py +++ b/hazelcast/protocol/codec/map_get_all_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_get_codec.py b/hazelcast/protocol/codec/map_get_codec.py index d5d12df948..37e3deae8d 100644 --- a/hazelcast/protocol/codec/map_get_codec.py +++ b/hazelcast/protocol/codec/map_get_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_get_entry_view_codec.py b/hazelcast/protocol/codec/map_get_entry_view_codec.py index 8d6d912995..ef934460d9 100644 --- a/hazelcast/protocol/codec/map_get_entry_view_codec.py +++ b/hazelcast/protocol/codec/map_get_entry_view_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.codec.custom.simple_entry_view_codec import SimpleEntryViewCodec @@ -32,8 +27,6 @@ def encode_request(name, key, thread_id): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["max_idle"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_MAX_IDLE_OFFSET - ) + response["max_idle"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_MAX_IDLE_OFFSET) response["response"] = CodecUtil.decode_nullable(msg, SimpleEntryViewCodec.decode) return response diff --git a/hazelcast/protocol/codec/map_is_empty_codec.py b/hazelcast/protocol/codec/map_is_empty_codec.py index 5d2eef80c8..653003cd74 100644 --- a/hazelcast/protocol/codec/map_is_empty_codec.py +++ b/hazelcast/protocol/codec/map_is_empty_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x012B00 diff --git a/hazelcast/protocol/codec/map_is_locked_codec.py b/hazelcast/protocol/codec/map_is_locked_codec.py index f5b4609888..8e7321ad7b 100644 --- a/hazelcast/protocol/codec/map_is_locked_codec.py +++ b/hazelcast/protocol/codec/map_is_locked_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_key_set_codec.py b/hazelcast/protocol/codec/map_key_set_codec.py index 13fb5477b8..e94247fa92 100644 --- a/hazelcast/protocol/codec/map_key_set_codec.py +++ b/hazelcast/protocol/codec/map_key_set_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py b/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py index 087edea3ec..e1e4e903a2 100644 --- a/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py +++ b/hazelcast/protocol/codec/map_key_set_with_paging_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.paging_predicate_holder_codec import PagingPredicateHolderCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py b/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py index 5ac240fbdc..5f69ea9025 100644 --- a/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_key_set_with_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_load_all_codec.py b/hazelcast/protocol/codec/map_load_all_codec.py index 9932e14417..b0879d6781 100644 --- a/hazelcast/protocol/codec/map_load_all_codec.py +++ b/hazelcast/protocol/codec/map_load_all_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x012000 @@ -18,8 +14,6 @@ def encode_request(name, replace_existing_values): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) - FixSizedTypesCodec.encode_boolean( - buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values - ) + FixSizedTypesCodec.encode_boolean(buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values) StringCodec.encode(buf, name, True) return OutboundMessage(buf, False) diff --git a/hazelcast/protocol/codec/map_load_given_keys_codec.py b/hazelcast/protocol/codec/map_load_given_keys_codec.py index daac9003c8..6d658ba877 100644 --- a/hazelcast/protocol/codec/map_load_given_keys_codec.py +++ b/hazelcast/protocol/codec/map_load_given_keys_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec @@ -20,9 +16,7 @@ def encode_request(name, keys, replace_existing_values): buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE) - FixSizedTypesCodec.encode_boolean( - buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values - ) + FixSizedTypesCodec.encode_boolean(buf, _REQUEST_REPLACE_EXISTING_VALUES_OFFSET, replace_existing_values) StringCodec.encode(buf, name) ListMultiFrameCodec.encode(buf, keys, DataCodec.encode, True) return OutboundMessage(buf, False) diff --git a/hazelcast/protocol/codec/map_lock_codec.py b/hazelcast/protocol/codec/map_lock_codec.py index 76eb9045c1..85583b0d6c 100644 --- a/hazelcast/protocol/codec/map_lock_codec.py +++ b/hazelcast/protocol/codec/map_lock_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_project_codec.py b/hazelcast/protocol/codec/map_project_codec.py index 30a370c4dc..1c5cfd4433 100644 --- a/hazelcast/protocol/codec/map_project_codec.py +++ b/hazelcast/protocol/codec/map_project_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_project_with_predicate_codec.py b/hazelcast/protocol/codec/map_project_with_predicate_codec.py index 6d314fbd56..9ba5200014 100644 --- a/hazelcast/protocol/codec/map_project_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_project_with_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_put_all_codec.py b/hazelcast/protocol/codec/map_put_all_codec.py index d33af05524..9dfc8ae95d 100644 --- a/hazelcast/protocol/codec/map_put_all_codec.py +++ b/hazelcast/protocol/codec/map_put_all_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_put_codec.py b/hazelcast/protocol/codec/map_put_codec.py index 083ab905d0..fa6919ea55 100644 --- a/hazelcast/protocol/codec/map_put_codec.py +++ b/hazelcast/protocol/codec/map_put_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_if_absent_codec.py b/hazelcast/protocol/codec/map_put_if_absent_codec.py index fba0b4b1b9..6d9cd16d37 100644 --- a/hazelcast/protocol/codec/map_put_if_absent_codec.py +++ b/hazelcast/protocol/codec/map_put_if_absent_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py b/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py index 5402837b61..871e188525 100644 --- a/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_put_if_absent_with_max_idle_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_transient_codec.py b/hazelcast/protocol/codec/map_put_transient_codec.py index f28524442e..035bad3db0 100644 --- a/hazelcast/protocol/codec/map_put_transient_codec.py +++ b/hazelcast/protocol/codec/map_put_transient_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py b/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py index a015741016..f0a7dce75b 100644 --- a/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_put_transient_with_max_idle_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_put_with_max_idle_codec.py b/hazelcast/protocol/codec/map_put_with_max_idle_codec.py index 041d5991cc..83196ffafe 100644 --- a/hazelcast/protocol/codec/map_put_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_put_with_max_idle_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_remove_all_codec.py b/hazelcast/protocol/codec/map_remove_all_codec.py index 12e0ae5217..2df01d2b07 100644 --- a/hazelcast/protocol/codec/map_remove_all_codec.py +++ b/hazelcast/protocol/codec/map_remove_all_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_remove_codec.py b/hazelcast/protocol/codec/map_remove_codec.py index 9a25fab1f9..2001d5fa87 100644 --- a/hazelcast/protocol/codec/map_remove_codec.py +++ b/hazelcast/protocol/codec/map_remove_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_remove_entry_listener_codec.py b/hazelcast/protocol/codec/map_remove_entry_listener_codec.py index cc2bf1376a..d81b1ead95 100644 --- a/hazelcast/protocol/codec/map_remove_entry_listener_codec.py +++ b/hazelcast/protocol/codec/map_remove_entry_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x011A00 diff --git a/hazelcast/protocol/codec/map_remove_if_same_codec.py b/hazelcast/protocol/codec/map_remove_if_same_codec.py index 5a4ae13e0c..8bace723da 100644 --- a/hazelcast/protocol/codec/map_remove_if_same_codec.py +++ b/hazelcast/protocol/codec/map_remove_if_same_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_remove_interceptor_codec.py b/hazelcast/protocol/codec/map_remove_interceptor_codec.py index ddf011c943..93d14e1c16 100644 --- a/hazelcast/protocol/codec/map_remove_interceptor_codec.py +++ b/hazelcast/protocol/codec/map_remove_interceptor_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x011500 diff --git a/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py b/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py index e7c694ea70..e089b1dd63 100644 --- a/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py +++ b/hazelcast/protocol/codec/map_remove_partition_lost_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x011C00 diff --git a/hazelcast/protocol/codec/map_replace_codec.py b/hazelcast/protocol/codec/map_replace_codec.py index f116c3dd9c..910857cf55 100644 --- a/hazelcast/protocol/codec/map_replace_codec.py +++ b/hazelcast/protocol/codec/map_replace_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_replace_if_same_codec.py b/hazelcast/protocol/codec/map_replace_if_same_codec.py index f20ff4ba05..8f7f295121 100644 --- a/hazelcast/protocol/codec/map_replace_if_same_codec.py +++ b/hazelcast/protocol/codec/map_replace_if_same_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_set_codec.py b/hazelcast/protocol/codec/map_set_codec.py index d19526d221..a7baffea49 100644 --- a/hazelcast/protocol/codec/map_set_codec.py +++ b/hazelcast/protocol/codec/map_set_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_set_ttl_codec.py b/hazelcast/protocol/codec/map_set_ttl_codec.py index e9c4457b6f..ea27b26ce9 100644 --- a/hazelcast/protocol/codec/map_set_ttl_codec.py +++ b/hazelcast/protocol/codec/map_set_ttl_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_set_with_max_idle_codec.py b/hazelcast/protocol/codec/map_set_with_max_idle_codec.py index 88756dfb19..2afae0097a 100644 --- a/hazelcast/protocol/codec/map_set_with_max_idle_codec.py +++ b/hazelcast/protocol/codec/map_set_with_max_idle_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_size_codec.py b/hazelcast/protocol/codec/map_size_codec.py index 1c6245359d..b781a5afd1 100644 --- a/hazelcast/protocol/codec/map_size_codec.py +++ b/hazelcast/protocol/codec/map_size_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x012A00 diff --git a/hazelcast/protocol/codec/map_submit_to_key_codec.py b/hazelcast/protocol/codec/map_submit_to_key_codec.py index 6f985a9b16..660d412968 100644 --- a/hazelcast/protocol/codec/map_submit_to_key_codec.py +++ b/hazelcast/protocol/codec/map_submit_to_key_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/map_try_lock_codec.py b/hazelcast/protocol/codec/map_try_lock_codec.py index 262966c42d..c8684830b6 100644 --- a/hazelcast/protocol/codec/map_try_lock_codec.py +++ b/hazelcast/protocol/codec/map_try_lock_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_try_put_codec.py b/hazelcast/protocol/codec/map_try_put_codec.py index 6da9111257..0ff8680321 100644 --- a/hazelcast/protocol/codec/map_try_put_codec.py +++ b/hazelcast/protocol/codec/map_try_put_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_try_remove_codec.py b/hazelcast/protocol/codec/map_try_remove_codec.py index 413c611b63..8e456dedc1 100644 --- a/hazelcast/protocol/codec/map_try_remove_codec.py +++ b/hazelcast/protocol/codec/map_try_remove_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_unlock_codec.py b/hazelcast/protocol/codec/map_unlock_codec.py index 6b8ec89f77..3b3568e8db 100644 --- a/hazelcast/protocol/codec/map_unlock_codec.py +++ b/hazelcast/protocol/codec/map_unlock_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_values_codec.py b/hazelcast/protocol/codec/map_values_codec.py index 2581688464..a6548d12d7 100644 --- a/hazelcast/protocol/codec/map_values_codec.py +++ b/hazelcast/protocol/codec/map_values_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py b/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py index 01a7b020ef..85da7e0b9b 100644 --- a/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py +++ b/hazelcast/protocol/codec/map_values_with_paging_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.codec.custom.paging_predicate_holder_codec import PagingPredicateHolderCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/map_values_with_predicate_codec.py b/hazelcast/protocol/codec/map_values_with_predicate_codec.py index 0f3b5da231..b16dc1cc0d 100644 --- a/hazelcast/protocol/codec/map_values_with_predicate_codec.py +++ b/hazelcast/protocol/codec/map_values_with_predicate_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py b/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py index da933f87d1..87a5f53e9e 100644 --- a/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py +++ b/hazelcast/protocol/codec/multi_map_add_entry_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -44,18 +38,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py b/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py index 840e8d7130..66eaa4243d 100644 --- a/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py +++ b/hazelcast/protocol/codec/multi_map_add_entry_listener_to_key_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -45,18 +39,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/multi_map_clear_codec.py b/hazelcast/protocol/codec/multi_map_clear_codec.py index f15c543213..6fe42e26db 100644 --- a/hazelcast/protocol/codec/multi_map_clear_codec.py +++ b/hazelcast/protocol/codec/multi_map_clear_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x020B00 diff --git a/hazelcast/protocol/codec/multi_map_contains_entry_codec.py b/hazelcast/protocol/codec/multi_map_contains_entry_codec.py index 241caea2dd..934d5355a4 100644 --- a/hazelcast/protocol/codec/multi_map_contains_entry_codec.py +++ b/hazelcast/protocol/codec/multi_map_contains_entry_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_contains_key_codec.py b/hazelcast/protocol/codec/multi_map_contains_key_codec.py index f697a2c66c..f01ecf66da 100644 --- a/hazelcast/protocol/codec/multi_map_contains_key_codec.py +++ b/hazelcast/protocol/codec/multi_map_contains_key_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_contains_value_codec.py b/hazelcast/protocol/codec/multi_map_contains_value_codec.py index b514236578..5cd15d3a62 100644 --- a/hazelcast/protocol/codec/multi_map_contains_value_codec.py +++ b/hazelcast/protocol/codec/multi_map_contains_value_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_delete_codec.py b/hazelcast/protocol/codec/multi_map_delete_codec.py index 254bcd1aa5..8a6bd44cb5 100644 --- a/hazelcast/protocol/codec/multi_map_delete_codec.py +++ b/hazelcast/protocol/codec/multi_map_delete_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_entry_set_codec.py b/hazelcast/protocol/codec/multi_map_entry_set_codec.py index 0d5661c1a1..26f974a1b4 100644 --- a/hazelcast/protocol/codec/multi_map_entry_set_codec.py +++ b/hazelcast/protocol/codec/multi_map_entry_set_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_force_unlock_codec.py b/hazelcast/protocol/codec/multi_map_force_unlock_codec.py index 7b452338e4..baae79651b 100644 --- a/hazelcast/protocol/codec/multi_map_force_unlock_codec.py +++ b/hazelcast/protocol/codec/multi_map_force_unlock_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_get_codec.py b/hazelcast/protocol/codec/multi_map_get_codec.py index b86f2fe147..8267f55c02 100644 --- a/hazelcast/protocol/codec/multi_map_get_codec.py +++ b/hazelcast/protocol/codec/multi_map_get_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/multi_map_is_locked_codec.py b/hazelcast/protocol/codec/multi_map_is_locked_codec.py index 29e04791b4..e535373e2f 100644 --- a/hazelcast/protocol/codec/multi_map_is_locked_codec.py +++ b/hazelcast/protocol/codec/multi_map_is_locked_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_key_set_codec.py b/hazelcast/protocol/codec/multi_map_key_set_codec.py index dcec2f7298..35e9c89c76 100644 --- a/hazelcast/protocol/codec/multi_map_key_set_codec.py +++ b/hazelcast/protocol/codec/multi_map_key_set_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_lock_codec.py b/hazelcast/protocol/codec/multi_map_lock_codec.py index e8df9cad81..09e80e3c08 100644 --- a/hazelcast/protocol/codec/multi_map_lock_codec.py +++ b/hazelcast/protocol/codec/multi_map_lock_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_put_codec.py b/hazelcast/protocol/codec/multi_map_put_codec.py index 1a0c472c67..493c83072d 100644 --- a/hazelcast/protocol/codec/multi_map_put_codec.py +++ b/hazelcast/protocol/codec/multi_map_put_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_remove_codec.py b/hazelcast/protocol/codec/multi_map_remove_codec.py index 46d971ab87..29c56a071e 100644 --- a/hazelcast/protocol/codec/multi_map_remove_codec.py +++ b/hazelcast/protocol/codec/multi_map_remove_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/multi_map_remove_entry_codec.py b/hazelcast/protocol/codec/multi_map_remove_entry_codec.py index 7b5d3da250..f286076eed 100644 --- a/hazelcast/protocol/codec/multi_map_remove_entry_codec.py +++ b/hazelcast/protocol/codec/multi_map_remove_entry_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py b/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py index f64cc4c7ec..ec47a2e7a1 100644 --- a/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py +++ b/hazelcast/protocol/codec/multi_map_remove_entry_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x020F00 diff --git a/hazelcast/protocol/codec/multi_map_size_codec.py b/hazelcast/protocol/codec/multi_map_size_codec.py index 09941a4556..ec108ee1d6 100644 --- a/hazelcast/protocol/codec/multi_map_size_codec.py +++ b/hazelcast/protocol/codec/multi_map_size_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x020A00 diff --git a/hazelcast/protocol/codec/multi_map_try_lock_codec.py b/hazelcast/protocol/codec/multi_map_try_lock_codec.py index f7ea1493b0..f410cf121e 100644 --- a/hazelcast/protocol/codec/multi_map_try_lock_codec.py +++ b/hazelcast/protocol/codec/multi_map_try_lock_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_unlock_codec.py b/hazelcast/protocol/codec/multi_map_unlock_codec.py index 89a3453bd0..5a14162d34 100644 --- a/hazelcast/protocol/codec/multi_map_unlock_codec.py +++ b/hazelcast/protocol/codec/multi_map_unlock_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_value_count_codec.py b/hazelcast/protocol/codec/multi_map_value_count_codec.py index eb5e3d30e7..0a1a570c0e 100644 --- a/hazelcast/protocol/codec/multi_map_value_count_codec.py +++ b/hazelcast/protocol/codec/multi_map_value_count_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/multi_map_values_codec.py b/hazelcast/protocol/codec/multi_map_values_codec.py index e612369152..e61a82211b 100644 --- a/hazelcast/protocol/codec/multi_map_values_codec.py +++ b/hazelcast/protocol/codec/multi_map_values_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/pn_counter_add_codec.py b/hazelcast/protocol/codec/pn_counter_add_codec.py index 0b66435bfc..f4c9ba7d5a 100644 --- a/hazelcast/protocol/codec/pn_counter_add_codec.py +++ b/hazelcast/protocol/codec/pn_counter_add_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListUUIDLongCodec @@ -36,8 +31,6 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["value"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_VALUE_OFFSET) - response["replica_count"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET - ) + response["replica_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET) response["replica_timestamps"] = EntryListUUIDLongCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/pn_counter_get_codec.py b/hazelcast/protocol/codec/pn_counter_get_codec.py index cc9384b448..149c8dc2c0 100644 --- a/hazelcast/protocol/codec/pn_counter_get_codec.py +++ b/hazelcast/protocol/codec/pn_counter_get_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListUUIDLongCodec @@ -32,8 +27,6 @@ def decode_response(msg): initial_frame = msg.next_frame() response = dict() response["value"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_VALUE_OFFSET) - response["replica_count"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET - ) + response["replica_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_REPLICA_COUNT_OFFSET) response["replica_timestamps"] = EntryListUUIDLongCodec.decode(msg) return response diff --git a/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py b/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py index 5f43dd5880..504fcca5d8 100644 --- a/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py +++ b/hazelcast/protocol/codec/pn_counter_get_configured_replica_count_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x1D0300 diff --git a/hazelcast/protocol/codec/queue_add_all_codec.py b/hazelcast/protocol/codec/queue_add_all_codec.py index 1743464623..8a2b58ee0e 100644 --- a/hazelcast/protocol/codec/queue_add_all_codec.py +++ b/hazelcast/protocol/codec/queue_add_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_add_listener_codec.py b/hazelcast/protocol/codec/queue_add_listener_codec.py index 8bf3264fdb..41f59af93b 100644 --- a/hazelcast/protocol/codec/queue_add_listener_codec.py +++ b/hazelcast/protocol/codec/queue_add_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/queue_clear_codec.py b/hazelcast/protocol/codec/queue_clear_codec.py index df5e3f69fb..f055b757b5 100644 --- a/hazelcast/protocol/codec/queue_clear_codec.py +++ b/hazelcast/protocol/codec/queue_clear_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x030F00 diff --git a/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py b/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py index 224d1aa334..56fb5ff438 100644 --- a/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py +++ b/hazelcast/protocol/codec/queue_compare_and_remove_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py b/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py index 3a5e1fd8f1..27a371827a 100644 --- a/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py +++ b/hazelcast/protocol/codec/queue_compare_and_retain_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_contains_all_codec.py b/hazelcast/protocol/codec/queue_contains_all_codec.py index dc033088f7..07e24ef5bb 100644 --- a/hazelcast/protocol/codec/queue_contains_all_codec.py +++ b/hazelcast/protocol/codec/queue_contains_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_contains_codec.py b/hazelcast/protocol/codec/queue_contains_codec.py index 9a5d310ef9..49250f1838 100644 --- a/hazelcast/protocol/codec/queue_contains_codec.py +++ b/hazelcast/protocol/codec/queue_contains_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_drain_to_codec.py b/hazelcast/protocol/codec/queue_drain_to_codec.py index 80e2eb96c5..98b6208045 100644 --- a/hazelcast/protocol/codec/queue_drain_to_codec.py +++ b/hazelcast/protocol/codec/queue_drain_to_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py b/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py index 571212c2a2..cbfd4831bb 100644 --- a/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py +++ b/hazelcast/protocol/codec/queue_drain_to_max_size_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_is_empty_codec.py b/hazelcast/protocol/codec/queue_is_empty_codec.py index adf3a90a36..561c260af0 100644 --- a/hazelcast/protocol/codec/queue_is_empty_codec.py +++ b/hazelcast/protocol/codec/queue_is_empty_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x031400 diff --git a/hazelcast/protocol/codec/queue_iterator_codec.py b/hazelcast/protocol/codec/queue_iterator_codec.py index 8640b0f168..908b58e6d6 100644 --- a/hazelcast/protocol/codec/queue_iterator_codec.py +++ b/hazelcast/protocol/codec/queue_iterator_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_offer_codec.py b/hazelcast/protocol/codec/queue_offer_codec.py index de03a3feaf..782800e4e0 100644 --- a/hazelcast/protocol/codec/queue_offer_codec.py +++ b/hazelcast/protocol/codec/queue_offer_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_peek_codec.py b/hazelcast/protocol/codec/queue_peek_codec.py index dc9bce703b..b382cf0b43 100644 --- a/hazelcast/protocol/codec/queue_peek_codec.py +++ b/hazelcast/protocol/codec/queue_peek_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/queue_poll_codec.py b/hazelcast/protocol/codec/queue_poll_codec.py index 4a16315e19..72de092e3d 100644 --- a/hazelcast/protocol/codec/queue_poll_codec.py +++ b/hazelcast/protocol/codec/queue_poll_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/queue_put_codec.py b/hazelcast/protocol/codec/queue_put_codec.py index bef8e02f2a..1d16075041 100644 --- a/hazelcast/protocol/codec/queue_put_codec.py +++ b/hazelcast/protocol/codec/queue_put_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_remaining_capacity_codec.py b/hazelcast/protocol/codec/queue_remaining_capacity_codec.py index 3e4ebab2b4..20840bbe9c 100644 --- a/hazelcast/protocol/codec/queue_remaining_capacity_codec.py +++ b/hazelcast/protocol/codec/queue_remaining_capacity_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x031300 diff --git a/hazelcast/protocol/codec/queue_remove_codec.py b/hazelcast/protocol/codec/queue_remove_codec.py index bd6c7c8ad2..a6356c7166 100644 --- a/hazelcast/protocol/codec/queue_remove_codec.py +++ b/hazelcast/protocol/codec/queue_remove_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/queue_remove_listener_codec.py b/hazelcast/protocol/codec/queue_remove_listener_codec.py index 36099de182..5fecf5d315 100644 --- a/hazelcast/protocol/codec/queue_remove_listener_codec.py +++ b/hazelcast/protocol/codec/queue_remove_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x031200 diff --git a/hazelcast/protocol/codec/queue_size_codec.py b/hazelcast/protocol/codec/queue_size_codec.py index d7c507a93c..747ff4a6cc 100644 --- a/hazelcast/protocol/codec/queue_size_codec.py +++ b/hazelcast/protocol/codec/queue_size_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x030300 diff --git a/hazelcast/protocol/codec/queue_take_codec.py b/hazelcast/protocol/codec/queue_take_codec.py index c990444a6f..1cef947bb8 100644 --- a/hazelcast/protocol/codec/queue_take_codec.py +++ b/hazelcast/protocol/codec/queue_take_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py index fe97ac9a86..9243021f98 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -42,18 +36,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py index de1dee1a79..1e1f47075a 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -43,18 +37,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py index ff97a734d2..5f804087b8 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_to_key_with_predicate_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -44,18 +38,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py b/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py index 1bc415f49c..5ca861ef74 100644 --- a/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_entry_listener_with_predicate_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -43,18 +37,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py b/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py index 50c4349d5d..85ac2df246 100644 --- a/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py +++ b/hazelcast/protocol/codec/replicated_map_add_near_cache_entry_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -44,18 +38,12 @@ def handle(msg, handle_entry_event=None): message_type = msg.get_message_type() if message_type == _EVENT_ENTRY_MESSAGE_TYPE and handle_entry_event is not None: initial_frame = msg.next_frame() - event_type = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET - ) + event_type = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_EVENT_TYPE_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_ENTRY_UUID_OFFSET) - number_of_affected_entries = FixSizedTypesCodec.decode_int( - initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET - ) + number_of_affected_entries = FixSizedTypesCodec.decode_int(initial_frame.buf, _EVENT_ENTRY_NUMBER_OF_AFFECTED_ENTRIES_OFFSET) key = CodecUtil.decode_nullable(msg, DataCodec.decode) value = CodecUtil.decode_nullable(msg, DataCodec.decode) old_value = CodecUtil.decode_nullable(msg, DataCodec.decode) merging_value = CodecUtil.decode_nullable(msg, DataCodec.decode) - handle_entry_event( - key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries - ) + handle_entry_event(key, value, old_value, merging_value, event_type, uuid, number_of_affected_entries) return diff --git a/hazelcast/protocol/codec/replicated_map_clear_codec.py b/hazelcast/protocol/codec/replicated_map_clear_codec.py index 3e2c93dfac..1a43cecc72 100644 --- a/hazelcast/protocol/codec/replicated_map_clear_codec.py +++ b/hazelcast/protocol/codec/replicated_map_clear_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0900 diff --git a/hazelcast/protocol/codec/replicated_map_contains_key_codec.py b/hazelcast/protocol/codec/replicated_map_contains_key_codec.py index 158bb5f23c..51516cc044 100644 --- a/hazelcast/protocol/codec/replicated_map_contains_key_codec.py +++ b/hazelcast/protocol/codec/replicated_map_contains_key_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_contains_value_codec.py b/hazelcast/protocol/codec/replicated_map_contains_value_codec.py index b6de936cc4..7b1bf23021 100644 --- a/hazelcast/protocol/codec/replicated_map_contains_value_codec.py +++ b/hazelcast/protocol/codec/replicated_map_contains_value_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_entry_set_codec.py b/hazelcast/protocol/codec/replicated_map_entry_set_codec.py index 118fd2a36d..e66c0914f8 100644 --- a/hazelcast/protocol/codec/replicated_map_entry_set_codec.py +++ b/hazelcast/protocol/codec/replicated_map_entry_set_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_get_codec.py b/hazelcast/protocol/codec/replicated_map_get_codec.py index b8739e73c4..6529fe9997 100644 --- a/hazelcast/protocol/codec/replicated_map_get_codec.py +++ b/hazelcast/protocol/codec/replicated_map_get_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_is_empty_codec.py b/hazelcast/protocol/codec/replicated_map_is_empty_codec.py index 13fc340299..249e4487a7 100644 --- a/hazelcast/protocol/codec/replicated_map_is_empty_codec.py +++ b/hazelcast/protocol/codec/replicated_map_is_empty_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0300 diff --git a/hazelcast/protocol/codec/replicated_map_key_set_codec.py b/hazelcast/protocol/codec/replicated_map_key_set_codec.py index b15df6644c..192439648f 100644 --- a/hazelcast/protocol/codec/replicated_map_key_set_codec.py +++ b/hazelcast/protocol/codec/replicated_map_key_set_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_put_all_codec.py b/hazelcast/protocol/codec/replicated_map_put_all_codec.py index eb0b1b0903..e0f1741dd0 100644 --- a/hazelcast/protocol/codec/replicated_map_put_all_codec.py +++ b/hazelcast/protocol/codec/replicated_map_put_all_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import EntryListCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/replicated_map_put_codec.py b/hazelcast/protocol/codec/replicated_map_put_codec.py index 9027f1394f..f0f0040ebe 100644 --- a/hazelcast/protocol/codec/replicated_map_put_codec.py +++ b/hazelcast/protocol/codec/replicated_map_put_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_remove_codec.py b/hazelcast/protocol/codec/replicated_map_remove_codec.py index ca2f7ac023..d5289eb9a3 100644 --- a/hazelcast/protocol/codec/replicated_map_remove_codec.py +++ b/hazelcast/protocol/codec/replicated_map_remove_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py b/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py index cdb331dbb0..29197dcc1a 100644 --- a/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py +++ b/hazelcast/protocol/codec/replicated_map_remove_entry_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0E00 diff --git a/hazelcast/protocol/codec/replicated_map_size_codec.py b/hazelcast/protocol/codec/replicated_map_size_codec.py index 519657930e..de73651a23 100644 --- a/hazelcast/protocol/codec/replicated_map_size_codec.py +++ b/hazelcast/protocol/codec/replicated_map_size_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x0D0200 diff --git a/hazelcast/protocol/codec/replicated_map_values_codec.py b/hazelcast/protocol/codec/replicated_map_values_codec.py index db827b864a..85f6d85ff0 100644 --- a/hazelcast/protocol/codec/replicated_map_values_codec.py +++ b/hazelcast/protocol/codec/replicated_map_values_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/ringbuffer_add_all_codec.py b/hazelcast/protocol/codec/ringbuffer_add_all_codec.py index 72d41f9410..9982d2f43b 100644 --- a/hazelcast/protocol/codec/ringbuffer_add_all_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_add_all_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/ringbuffer_add_codec.py b/hazelcast/protocol/codec/ringbuffer_add_codec.py index 5157572f90..827ca3e245 100644 --- a/hazelcast/protocol/codec/ringbuffer_add_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_add_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/ringbuffer_capacity_codec.py b/hazelcast/protocol/codec/ringbuffer_capacity_codec.py index 8b0d869cc1..c6f66d8b01 100644 --- a/hazelcast/protocol/codec/ringbuffer_capacity_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_capacity_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x170400 diff --git a/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py b/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py index c8db96bd53..2d68f84f04 100644 --- a/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_head_sequence_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x170300 diff --git a/hazelcast/protocol/codec/ringbuffer_read_many_codec.py b/hazelcast/protocol/codec/ringbuffer_read_many_codec.py index b2040c02c4..5e9afce8d6 100644 --- a/hazelcast/protocol/codec/ringbuffer_read_many_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_read_many_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil @@ -38,12 +33,8 @@ def encode_request(name, start_sequence, min_count, max_count, filter): def decode_response(msg): initial_frame = msg.next_frame() response = dict() - response["read_count"] = FixSizedTypesCodec.decode_int( - initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET - ) - response["next_seq"] = FixSizedTypesCodec.decode_long( - initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET - ) + response["read_count"] = FixSizedTypesCodec.decode_int(initial_frame.buf, _RESPONSE_READ_COUNT_OFFSET) + response["next_seq"] = FixSizedTypesCodec.decode_long(initial_frame.buf, _RESPONSE_NEXT_SEQ_OFFSET) response["items"] = ListMultiFrameCodec.decode(msg, DataCodec.decode) response["item_seqs"] = CodecUtil.decode_nullable(msg, LongArrayCodec.decode) return response diff --git a/hazelcast/protocol/codec/ringbuffer_read_one_codec.py b/hazelcast/protocol/codec/ringbuffer_read_one_codec.py index 4cef6c19b4..9480196294 100644 --- a/hazelcast/protocol/codec/ringbuffer_read_one_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_read_one_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py b/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py index 520a29f638..26b1245789 100644 --- a/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_remaining_capacity_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x170500 diff --git a/hazelcast/protocol/codec/ringbuffer_size_codec.py b/hazelcast/protocol/codec/ringbuffer_size_codec.py index 89ba885374..02924b7c85 100644 --- a/hazelcast/protocol/codec/ringbuffer_size_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_size_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x170100 diff --git a/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py b/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py index a39b1148d8..c575287018 100644 --- a/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py +++ b/hazelcast/protocol/codec/ringbuffer_tail_sequence_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x170200 diff --git a/hazelcast/protocol/codec/semaphore_acquire_codec.py b/hazelcast/protocol/codec/semaphore_acquire_codec.py index bc4b3b779e..839d4a9ef5 100644 --- a/hazelcast/protocol/codec/semaphore_acquire_codec.py +++ b/hazelcast/protocol/codec/semaphore_acquire_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_available_permits_codec.py b/hazelcast/protocol/codec/semaphore_available_permits_codec.py index b67cd29088..659ee4d9b2 100644 --- a/hazelcast/protocol/codec/semaphore_available_permits_codec.py +++ b/hazelcast/protocol/codec/semaphore_available_permits_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_change_codec.py b/hazelcast/protocol/codec/semaphore_change_codec.py index a6ee89b79d..98eeba4c52 100644 --- a/hazelcast/protocol/codec/semaphore_change_codec.py +++ b/hazelcast/protocol/codec/semaphore_change_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_drain_codec.py b/hazelcast/protocol/codec/semaphore_drain_codec.py index 24f190a0cc..6d3b944b4c 100644 --- a/hazelcast/protocol/codec/semaphore_drain_codec.py +++ b/hazelcast/protocol/codec/semaphore_drain_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py b/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py index e58a6f8c1c..31f6f037fe 100644 --- a/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py +++ b/hazelcast/protocol/codec/semaphore_get_semaphore_type_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x0C0700 diff --git a/hazelcast/protocol/codec/semaphore_init_codec.py b/hazelcast/protocol/codec/semaphore_init_codec.py index 76c859d13a..22ff60d144 100644 --- a/hazelcast/protocol/codec/semaphore_init_codec.py +++ b/hazelcast/protocol/codec/semaphore_init_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/semaphore_release_codec.py b/hazelcast/protocol/codec/semaphore_release_codec.py index 5285562591..9bbf4e5c70 100644 --- a/hazelcast/protocol/codec/semaphore_release_codec.py +++ b/hazelcast/protocol/codec/semaphore_release_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazelcast.protocol.builtin import StringCodec diff --git a/hazelcast/protocol/codec/set_add_all_codec.py b/hazelcast/protocol/codec/set_add_all_codec.py index 59d255d988..9f24d02757 100644 --- a/hazelcast/protocol/codec/set_add_all_codec.py +++ b/hazelcast/protocol/codec/set_add_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_add_codec.py b/hazelcast/protocol/codec/set_add_codec.py index ac6580d544..4c39c67e4b 100644 --- a/hazelcast/protocol/codec/set_add_codec.py +++ b/hazelcast/protocol/codec/set_add_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_add_listener_codec.py b/hazelcast/protocol/codec/set_add_listener_codec.py index 8b9c467a30..987558fdfa 100644 --- a/hazelcast/protocol/codec/set_add_listener_codec.py +++ b/hazelcast/protocol/codec/set_add_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/set_clear_codec.py b/hazelcast/protocol/codec/set_clear_codec.py index ebcf9ccb18..93c8ea4229 100644 --- a/hazelcast/protocol/codec/set_clear_codec.py +++ b/hazelcast/protocol/codec/set_clear_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec # hex: 0x060900 diff --git a/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py b/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py index 440813dba9..ae90977820 100644 --- a/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py +++ b/hazelcast/protocol/codec/set_compare_and_remove_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py b/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py index f2416bdf2d..b736fca717 100644 --- a/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py +++ b/hazelcast/protocol/codec/set_compare_and_retain_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_contains_all_codec.py b/hazelcast/protocol/codec/set_contains_all_codec.py index 8c0c9e403e..40033dfe9b 100644 --- a/hazelcast/protocol/codec/set_contains_all_codec.py +++ b/hazelcast/protocol/codec/set_contains_all_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_contains_codec.py b/hazelcast/protocol/codec/set_contains_codec.py index c49755dadf..6d3a6bc19e 100644 --- a/hazelcast/protocol/codec/set_contains_codec.py +++ b/hazelcast/protocol/codec/set_contains_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_get_all_codec.py b/hazelcast/protocol/codec/set_get_all_codec.py index 077ba9efb1..74c3d86947 100644 --- a/hazelcast/protocol/codec/set_get_all_codec.py +++ b/hazelcast/protocol/codec/set_get_all_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_is_empty_codec.py b/hazelcast/protocol/codec/set_is_empty_codec.py index a6b8bd894d..4fba7a2a71 100644 --- a/hazelcast/protocol/codec/set_is_empty_codec.py +++ b/hazelcast/protocol/codec/set_is_empty_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x060D00 diff --git a/hazelcast/protocol/codec/set_remove_codec.py b/hazelcast/protocol/codec/set_remove_codec.py index dc98419997..a88decce28 100644 --- a/hazelcast/protocol/codec/set_remove_codec.py +++ b/hazelcast/protocol/codec/set_remove_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/set_remove_listener_codec.py b/hazelcast/protocol/codec/set_remove_listener_codec.py index b3f9b26dd4..fe0ae06816 100644 --- a/hazelcast/protocol/codec/set_remove_listener_codec.py +++ b/hazelcast/protocol/codec/set_remove_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x060C00 diff --git a/hazelcast/protocol/codec/set_size_codec.py b/hazelcast/protocol/codec/set_size_codec.py index cb25b95858..d5a7fd1f76 100644 --- a/hazelcast/protocol/codec/set_size_codec.py +++ b/hazelcast/protocol/codec/set_size_codec.py @@ -1,10 +1,5 @@ from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x060100 diff --git a/hazelcast/protocol/codec/topic_add_message_listener_codec.py b/hazelcast/protocol/codec/topic_add_message_listener_codec.py index e89b65151c..f82124d491 100644 --- a/hazelcast/protocol/codec/topic_add_message_listener_codec.py +++ b/hazelcast/protocol/codec/topic_add_message_listener_codec.py @@ -1,12 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, - EVENT_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE, EVENT_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec @@ -40,9 +34,7 @@ def handle(msg, handle_topic_event=None): message_type = msg.get_message_type() if message_type == _EVENT_TOPIC_MESSAGE_TYPE and handle_topic_event is not None: initial_frame = msg.next_frame() - publish_time = FixSizedTypesCodec.decode_long( - initial_frame.buf, _EVENT_TOPIC_PUBLISH_TIME_OFFSET - ) + publish_time = FixSizedTypesCodec.decode_long(initial_frame.buf, _EVENT_TOPIC_PUBLISH_TIME_OFFSET) uuid = FixSizedTypesCodec.decode_uuid(initial_frame.buf, _EVENT_TOPIC_UUID_OFFSET) item = DataCodec.decode(msg) handle_topic_event(item, publish_time, uuid) diff --git a/hazelcast/protocol/codec/topic_publish_codec.py b/hazelcast/protocol/codec/topic_publish_codec.py index cff9ae4ab7..cf80610184 100644 --- a/hazelcast/protocol/codec/topic_publish_codec.py +++ b/hazelcast/protocol/codec/topic_publish_codec.py @@ -1,8 +1,4 @@ -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/topic_remove_message_listener_codec.py b/hazelcast/protocol/codec/topic_remove_message_listener_codec.py index 8bf4a2a5ad..cdcacd6437 100644 --- a/hazelcast/protocol/codec/topic_remove_message_listener_codec.py +++ b/hazelcast/protocol/codec/topic_remove_message_listener_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x040300 diff --git a/hazelcast/protocol/codec/transaction_commit_codec.py b/hazelcast/protocol/codec/transaction_commit_codec.py index 76d1ad75ba..6352c1402e 100644 --- a/hazelcast/protocol/codec/transaction_commit_codec.py +++ b/hazelcast/protocol/codec/transaction_commit_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer # hex: 0x150100 _REQUEST_MESSAGE_TYPE = 1376512 diff --git a/hazelcast/protocol/codec/transaction_create_codec.py b/hazelcast/protocol/codec/transaction_create_codec.py index 560d0a275f..50346a489d 100644 --- a/hazelcast/protocol/codec/transaction_create_codec.py +++ b/hazelcast/protocol/codec/transaction_create_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE # hex: 0x150200 _REQUEST_MESSAGE_TYPE = 1376768 diff --git a/hazelcast/protocol/codec/transaction_rollback_codec.py b/hazelcast/protocol/codec/transaction_rollback_codec.py index 2c78f8c555..49bcf73b6e 100644 --- a/hazelcast/protocol/codec/transaction_rollback_codec.py +++ b/hazelcast/protocol/codec/transaction_rollback_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer # hex: 0x150300 _REQUEST_MESSAGE_TYPE = 1377024 diff --git a/hazelcast/protocol/codec/transactional_list_add_codec.py b/hazelcast/protocol/codec/transactional_list_add_codec.py index df0c67e95f..a12dbf134b 100644 --- a/hazelcast/protocol/codec/transactional_list_add_codec.py +++ b/hazelcast/protocol/codec/transactional_list_add_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_list_remove_codec.py b/hazelcast/protocol/codec/transactional_list_remove_codec.py index 5e6689d6ef..243fb8eac8 100644 --- a/hazelcast/protocol/codec/transactional_list_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_list_remove_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_list_size_codec.py b/hazelcast/protocol/codec/transactional_list_size_codec.py index a2e5d20baf..24178e3f27 100644 --- a/hazelcast/protocol/codec/transactional_list_size_codec.py +++ b/hazelcast/protocol/codec/transactional_list_size_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x110300 diff --git a/hazelcast/protocol/codec/transactional_map_contains_key_codec.py b/hazelcast/protocol/codec/transactional_map_contains_key_codec.py index d8ac6a9839..ef5ee0026c 100644 --- a/hazelcast/protocol/codec/transactional_map_contains_key_codec.py +++ b/hazelcast/protocol/codec/transactional_map_contains_key_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_contains_value_codec.py b/hazelcast/protocol/codec/transactional_map_contains_value_codec.py index b3a6b19684..d1aa58bed6 100644 --- a/hazelcast/protocol/codec/transactional_map_contains_value_codec.py +++ b/hazelcast/protocol/codec/transactional_map_contains_value_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_delete_codec.py b/hazelcast/protocol/codec/transactional_map_delete_codec.py index 8109d872f8..c5b44716fc 100644 --- a/hazelcast/protocol/codec/transactional_map_delete_codec.py +++ b/hazelcast/protocol/codec/transactional_map_delete_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_get_codec.py b/hazelcast/protocol/codec/transactional_map_get_codec.py index 21b679ae6d..948d6a2c18 100644 --- a/hazelcast/protocol/codec/transactional_map_get_codec.py +++ b/hazelcast/protocol/codec/transactional_map_get_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py b/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py index 95462371ee..7baa3fb460 100644 --- a/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py +++ b/hazelcast/protocol/codec/transactional_map_get_for_update_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_is_empty_codec.py b/hazelcast/protocol/codec/transactional_map_is_empty_codec.py index 3042b897e7..b9698b76b8 100644 --- a/hazelcast/protocol/codec/transactional_map_is_empty_codec.py +++ b/hazelcast/protocol/codec/transactional_map_is_empty_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x0E0500 diff --git a/hazelcast/protocol/codec/transactional_map_key_set_codec.py b/hazelcast/protocol/codec/transactional_map_key_set_codec.py index 08b9c4efa9..9f6685ba60 100644 --- a/hazelcast/protocol/codec/transactional_map_key_set_codec.py +++ b/hazelcast/protocol/codec/transactional_map_key_set_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py b/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py index 980f99daec..0c1b350216 100644 --- a/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py +++ b/hazelcast/protocol/codec/transactional_map_key_set_with_predicate_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_map_put_codec.py b/hazelcast/protocol/codec/transactional_map_put_codec.py index d3941673c9..168d3226e8 100644 --- a/hazelcast/protocol/codec/transactional_map_put_codec.py +++ b/hazelcast/protocol/codec/transactional_map_put_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py b/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py index 421eea248d..8347608abc 100644 --- a/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py +++ b/hazelcast/protocol/codec/transactional_map_put_if_absent_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_remove_codec.py b/hazelcast/protocol/codec/transactional_map_remove_codec.py index 79c746907f..8d113267f9 100644 --- a/hazelcast/protocol/codec/transactional_map_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_map_remove_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py b/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py index 8dac2fc790..5815f2ef4a 100644 --- a/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py +++ b/hazelcast/protocol/codec/transactional_map_remove_if_same_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_replace_codec.py b/hazelcast/protocol/codec/transactional_map_replace_codec.py index bdda83131d..c72b508a7a 100644 --- a/hazelcast/protocol/codec/transactional_map_replace_codec.py +++ b/hazelcast/protocol/codec/transactional_map_replace_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py b/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py index d719c41c65..a528dc0e51 100644 --- a/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py +++ b/hazelcast/protocol/codec/transactional_map_replace_if_same_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_set_codec.py b/hazelcast/protocol/codec/transactional_map_set_codec.py index 71b1307542..03c28abd42 100644 --- a/hazelcast/protocol/codec/transactional_map_set_codec.py +++ b/hazelcast/protocol/codec/transactional_map_set_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_size_codec.py b/hazelcast/protocol/codec/transactional_map_size_codec.py index 55b6bf53a1..2003a033d0 100644 --- a/hazelcast/protocol/codec/transactional_map_size_codec.py +++ b/hazelcast/protocol/codec/transactional_map_size_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x0E0400 diff --git a/hazelcast/protocol/codec/transactional_map_values_codec.py b/hazelcast/protocol/codec/transactional_map_values_codec.py index 07a2402fb1..719dce5530 100644 --- a/hazelcast/protocol/codec/transactional_map_values_codec.py +++ b/hazelcast/protocol/codec/transactional_map_values_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import ListMultiFrameCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py b/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py index 1b17ff01f0..ab1726580a 100644 --- a/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py +++ b/hazelcast/protocol/codec/transactional_map_values_with_predicate_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_get_codec.py b/hazelcast/protocol/codec/transactional_multi_map_get_codec.py index c3bfa36918..52aee889f3 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_get_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_get_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_put_codec.py b/hazelcast/protocol/codec/transactional_multi_map_put_codec.py index 5d71dfec45..6f9708ea77 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_put_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_put_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py b/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py index 052a7e626b..0391af6469 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_remove_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py b/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py index 10ca77a5e6..bfe777b503 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_remove_entry_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_multi_map_size_codec.py b/hazelcast/protocol/codec/transactional_multi_map_size_codec.py index 2335e0e0d4..e0db226d88 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_size_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_size_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x0F0600 diff --git a/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py b/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py index 9618360539..be87494996 100644 --- a/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py +++ b/hazelcast/protocol/codec/transactional_multi_map_value_count_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_queue_offer_codec.py b/hazelcast/protocol/codec/transactional_queue_offer_codec.py index 84ed8681b2..b21d04d02b 100644 --- a/hazelcast/protocol/codec/transactional_queue_offer_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_offer_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_queue_peek_codec.py b/hazelcast/protocol/codec/transactional_queue_peek_codec.py index d5cafa0006..ca7f22a95c 100644 --- a/hazelcast/protocol/codec/transactional_queue_peek_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_peek_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_queue_poll_codec.py b/hazelcast/protocol/codec/transactional_queue_poll_codec.py index a918131805..924d9bc671 100644 --- a/hazelcast/protocol/codec/transactional_queue_poll_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_poll_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_queue_size_codec.py b/hazelcast/protocol/codec/transactional_queue_size_codec.py index 86e83af4a2..20039dd1dd 100644 --- a/hazelcast/protocol/codec/transactional_queue_size_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_size_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x120500 diff --git a/hazelcast/protocol/codec/transactional_queue_take_codec.py b/hazelcast/protocol/codec/transactional_queue_take_codec.py index 365a675693..0dfcfcbec7 100644 --- a/hazelcast/protocol/codec/transactional_queue_take_codec.py +++ b/hazelcast/protocol/codec/transactional_queue_take_codec.py @@ -1,10 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import CodecUtil diff --git a/hazelcast/protocol/codec/transactional_set_add_codec.py b/hazelcast/protocol/codec/transactional_set_add_codec.py index a269630e36..7680876274 100644 --- a/hazelcast/protocol/codec/transactional_set_add_codec.py +++ b/hazelcast/protocol/codec/transactional_set_add_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_set_remove_codec.py b/hazelcast/protocol/codec/transactional_set_remove_codec.py index 75c2a63f0a..a6b6a21460 100644 --- a/hazelcast/protocol/codec/transactional_set_remove_codec.py +++ b/hazelcast/protocol/codec/transactional_set_remove_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec diff --git a/hazelcast/protocol/codec/transactional_set_size_codec.py b/hazelcast/protocol/codec/transactional_set_size_codec.py index 62ce8b622a..f20e63e3d8 100644 --- a/hazelcast/protocol/codec/transactional_set_size_codec.py +++ b/hazelcast/protocol/codec/transactional_set_size_codec.py @@ -1,11 +1,6 @@ from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec -from hazelcast.protocol.client_message import ( - OutboundMessage, - REQUEST_HEADER_SIZE, - create_initial_buffer, - RESPONSE_HEADER_SIZE, -) +from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec # hex: 0x100300 diff --git a/pyproject.toml b/pyproject.toml index d1e66c1cc7..506eceba31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ exclude = ''' | dist | benchmarks + | hazelcast/protocol/codec | hazelcast/proxy | hazelcast/serialization | tests