hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java
public int getOrAssignOrdinal(ByteDataBuffer serializedRepresentation, int preferredOrdinal) {
        int hash = HashCodes.hashCode(serializedRepresentation);

        int ordinal = get(serializedRepresentation, hash);
        return ordinal != -1 ? ordinal : assignOrdinal(serializedRepresentation, hash, preferredOrdinal);
    }
public int getOrAssignOrdinal(ByteDataBuffer serializedRepresentation, int preferredOrdinal) {
        int hash = HashCodes.hashCode(serializedRepresentation);

        int ordinal = get(serializedRepresentation, hash);
        return ordinal != -1 ? ordinal : assignOrdinal(serializedRepresentation, hash, preferredOrdinal);
    }
Adds a sequence of bytes to this map.  If the sequence of bytes has previously been added
to this map then its assigned ordinal is returned.
If the sequence of bytes has not been added to this map then a new ordinal is assigned
and returned.
<p>
This operation is thread-safe.

@param serializedRepresentation the sequence of bytes
@param preferredOrdinal the preferred ordinal to assign, if not already assigned to
another sequence of bytes and the given sequence of bytes has not previously been added
@return the assigned ordinal