code: public void mapIterateAndRemove(Map<Long, Data> map) {
          if (map.size() <= 0) {
              return;
          }
  
          if (store.isEnabled()) {
              try {
                  store.deleteAll(map.keySet());
              } catch (Exception e) {
                  throw new HazelcastException(e);
              }
          }
          Iterator<QueueItem> iterator = getItemQueue().iterator();
          while (iterator.hasNext()) {
              QueueItem item = iterator.next();
              if (map.containsKey(item.getItemId())) {
                  iterator.remove();
                  // for stats
                  age(item, Clock.currentTimeMillis());
              }
          }
          scheduleEvictionIfEmpty();
      }
docs: Deletes items from the queue which have IDs contained in the key set of the given map. Also schedules the queue for
  destruction if it is empty or destroys it immediately if it is empty and {@link QueueConfig#getEmptyQueueTtl()} is 0.
  
  @param map the map of items which to be removed.