def add_all(self, items): """ Adds the elements in the specified collection if they're not exist in this set. :param items: (Collection), collection which includes the items to be added. :return: (bool), ``true`` if this set is changed after call, ``false`` otherwise. """ check_not_none(items, "Value can't be None") data_items = [] for item in items: check_not_none(item, "Value can't be None") data_items.append(self._to_data(item)) request = set_add_all_codec.encode_request(self.name, data_items) return self._invoke(request, set_add_all_codec.decode_response)
def add_all(self, items): """Adds the elements in the specified collection if they're not exist in this set. Args: items (list): Collection which includes the items to be added. Returns: hazelcast.future.Future[bool]: ``True`` if this set is changed after call, ``False`` otherwise. """ check_not_none(items, "Value can't be None") data_items = [] for item in items: check_not_none(item, "Value can't be None") data_items.append(self._to_data(item)) request = set_add_all_codec.encode_request(self.name, data_items) return self._invoke(request, set_add_all_codec.decode_response)
def add_all(self, items: typing.Sequence[ItemType]) -> Future[bool]: """Adds the elements in the specified collection if they're not exist in this set. Args: items: Collection which includes the items to be added. Returns: ``True`` if this set is changed after call, ``False`` otherwise. """ check_not_none(items, "Value can't be None") try: data_items = [] for item in items: check_not_none(item, "Value can't be None") data_items.append(self._to_data(item)) except SchemaNotReplicatedError as e: return self._send_schema_and_retry(e, self.add_all, items) request = set_add_all_codec.encode_request(self.name, data_items) return self._invoke(request, set_add_all_codec.decode_response)