@Override
  public synchronized int lookupOrInsert(int key,
                                         @NotNull ValueAcceptor valuesAcceptor,
                                         @NotNull ValueCreator valueCreator) throws IOException {
    HashMapSegmentLayout segment = segmentForKey(key);

    int valueFound = hashMapAlgo.lookup(segment, key, valuesAcceptor);
    if (valueFound != NO_VALUE) {
      return valueFound;
    }
    int newValue = valueCreator.newValueForKey(key);
    boolean reallyPut = putAndSplitSegmentIfNeeded(segment, key, newValue);
    assert reallyPut : key + " must be really put since we've checked it wasn't there";
    return newValue;
  }
@Override
  public synchronized int lookupOrInsert(int key,
                                         @NotNull ValueAcceptor valuesAcceptor,
                                         @NotNull ValueCreator valueCreator)