public boolean containsValue(Object value) {
    if (value == null) {
      throw new NullPointerException();
    }

    // See explanation of modCount use above

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

    // Try a few times without locking
    for (int k = 0; k < RETRIES_BEFORE_LOCK; ++k) {
      // int sum = 0;
      int mcsum = 0;
      for (int i = 0; i < segments.length; ++i) {
        // int c = segments[i].count;
        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) {
          // int c = segments[i].count;
          if (mc[i] != segments[i].modCount) {
            cleanSweep = false;
            break;
          }
        }
      }
      if (cleanSweep) {
        return false;
      }
    }
    // Resort to locking all segments
    for (final Segment<V> vSegment : segments) {
      vSegment.lock();
    }
    boolean found = false;
    try {
      for (final Segment<V> segment : segments) {
        if (segment.containsValue(value)) {
          found = true;
          break;
        }
      }
    } finally {
      for (final Segment<V> segment : segments) {
        segment.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/ObjIdConcurrentMap.java