@Override
  public int enumerate(@Nullable Data value) throws IOException {
    int valueHashCode;
    int stripe;
    if (value == null) {
      valueHashCode = -1;
      stripe = -1;
    }
    else {
      valueHashCode = myDataDescriptor.getHashCode(value);
      stripe = Math.abs(valueHashCode) & STRIPE_MASK;
    }

    Lock lock1 = null;
    if (value != null) {
      lock1 = myStripeLocks[stripe];
      lock1.lock();
      Integer cachedId;
      try {
        cachedId = myHashcodeToIdCache[stripe].get(valueHashCode);
      }
      finally {
        lock1.unlock();
      }

      if (cachedId != null) {
        int stripe2 = idStripe(cachedId.intValue());
        Lock lock2 = myStripeLocks[stripe2];
        lock2.lock();
        try {
          Data s = myIdToStringCache[stripe2].get(cachedId);
          if (s != null && myDataDescriptor.isEqual(value, s)) return cachedId.intValue();
        }
        finally {
          lock2.unlock();
        }
      }
    }

    int enumerate = myBase.enumerate(value);

    if (stripe != -1) {
      lock1.lock();
      Integer enumeratedInteger;
      try {
        enumeratedInteger = enumerate;
        myHashcodeToIdCache[stripe].put(valueHashCode, enumeratedInteger);
      }
      finally {
        lock1.unlock();
      }

      int stripe2 = idStripe(enumerate);
      Lock lock2 = myStripeLocks[stripe2];
      lock2.lock();
      try {
        myIdToStringCache[stripe2].put(enumeratedInteger, value);
      }
      finally {
        lock2.unlock();
      }
    }

    return enumerate;
  }
@Override
  public int enumerate(@Nullable Data value)