docs: public Map<Long, Data> drain(int maxSize) {
          int maxSizeParam = maxSize;
          if (maxSizeParam < 0 || maxSizeParam > getItemQueue().size()) {
              maxSizeParam = getItemQueue().size();
          }
          Map<Long, Data> map = createLinkedHashMap(maxSizeParam);
          mapDrainIterator(maxSizeParam, map);
          if (store.isEnabled() && maxSizeParam != 0) {
              try {
                  store.deleteAll(map.keySet());
              } catch (Exception e) {
                  throw new HazelcastException(e);
              }
          }
          long current = Clock.currentTimeMillis();
          for (int i = 0; i < maxSizeParam; i++) {
              QueueItem item = getItemQueue().poll();
              // for stats
              age(item, current);
          }
          if (maxSizeParam != 0) {
              scheduleEvictionIfEmpty();
          }
          return map;
      }