@Override
  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "UL_UNRELEASED_LOCK",
      justification = "Leaving this as is because it's lifted from JDK code and we want to minimize changes.")
  public boolean containsValue(final Object value) {
    if (value == null) {
      throw new NullPointerException();
    }

    // See explanation of modCount use above

    final Segment<K, V>[] segments = this.segments;
    final int[] mc = new int[segments.length];

    // Try a few times without locking
    for (int k = 0; k < RETRIES_BEFORE_LOCK; ++k) {
      int mcsum = 0;
      for (int i = 0; i < segments.length; ++i) {
        mcsum += mc[i] = segments[i].modCount;
        if (segments[i].containsValue(value)) {
          return true;
        }
      }
      boolean cleanSweep = true;
      if (mcsum != 0) {
        for (int i = 0; i < segments.length; ++i) {
          if (mc[i] != segments[i].modCount) {
            cleanSweep = false;
            break;
          }
        }
      }
      if (cleanSweep) {
        return false;
      }
    }
    // Resort to locking all segments
    for (final Segment<K, V> kvSegment : segments) {
      kvSegment.readLock().lock();
    }
    boolean found = false;
    try {
      for (final Segment<K, V> segment : segments) {
        if (segment.containsValue(value)) {
          found = true;
          break;
        }
      }
    } finally {
      for (final Segment<K, V> segment : segments) {
        segment.readLock().unlock();
      }
    }
    return found;
  }
Returns <tt>true</tt> if this map maps one or more keys to the specified value. Note: This
method requires a full internal traversal of the hash table, and so is much slower than method
<tt>containsKey</tt>.

@param value value whose presence in this map is to be tested
@return <tt>true</tt> if this map maps one or more keys to the specified value
@throws NullPointerException if the specified value is null
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap.java