/** * Note that this always returns null because the set is no longer valid after this call * * @param key * @return null */ @Override public Set<V> removeAll(@NotNull Object key) { SpillableSetImpl<V> spillableSet = getHelper((K) key); if (spillableSet != null) { cache.remove((K) key); map.put((K) key, new ImmutablePair<>(0, spillableSet.getHead())); spillableSet.clear(); removedSets.add(spillableSet); } return null; }