def encode_request(credentials, uuid, owner_uuid, is_owner_connection, client_type, serialization_version): """ Encode request into client_message""" client_message = ClientMessage(payload_size=calculate_size(credentials, uuid, owner_uuid, is_owner_connection, client_type, serialization_version)) client_message.set_message_type(REQUEST_TYPE) client_message.set_retryable(RETRYABLE) client_message.append_data(credentials) client_message.append_bool(uuid is None) if uuid is not None: client_message.append_str(uuid) client_message.append_bool(owner_uuid is None) if owner_uuid is not None: client_message.append_str(owner_uuid) client_message.append_bool(is_owner_connection) client_message.append_str(client_type) client_message.append_byte(serialization_version) client_message.update_frame_length() return client_message
def encode_request(credentials, uuid, owner_uuid, is_owner_connection, client_type, serialization_version, client_hazelcast_version): """ Encode request into client_message""" client_message = ClientMessage(payload_size=calculate_size(credentials, uuid, owner_uuid, is_owner_connection, client_type, serialization_version, client_hazelcast_version)) client_message.set_message_type(REQUEST_TYPE) client_message.set_retryable(RETRYABLE) client_message.append_data(credentials) client_message.append_bool(uuid is None) if uuid is not None: client_message.append_str(uuid) client_message.append_bool(owner_uuid is None) if owner_uuid is not None: client_message.append_str(owner_uuid) client_message.append_bool(is_owner_connection) client_message.append_str(client_type) client_message.append_byte(serialization_version) client_message.append_str(client_hazelcast_version) client_message.update_frame_length() return client_message