@Override public int put(long key){
  ArrayBasedLongToInternalIntFixedLengthBiMap map;
  int bucket;
  for (int i=0; i < readerAccessibleInfo.maps.length - 1; i++) {
    map=readerAccessibleInfo.maps[i];
    bucket=map.get(key);
    if (bucket != defaultGetReturnValue) {
      return bucket + readerAccessibleInfo.mapIndexOffsets[i];
    }
  }
  int numStoredKeysBefore=currentActiveMap.getNumStoredKeys();
  map=currentActiveMap;
  bucket=map.put(key) + currentActiveMapIndexOffset;
  numStoredKeysCounter.incr(currentActiveMap.getNumStoredKeys() - numStoredKeysBefore);
  if (map.isAtCapacity()) {
    addNewMap();
  }
  return bucket;
}

@ Override public int put ( long key ) { ArrayBasedLongToInternalIntFixedLengthBiMap map ; int bucket ; for ( int i = 0 ; i < readerAccessibleInfo . maps . length - 1 ; i ++ ) { map = readerAccessibleInfo . maps [ i ] ; bucket = map . get ( key ) ; if ( bucket != defaultGetReturnValue ) { return bucket + readerAccessibleInfo . mapIndexOffsets [ i ] ; } } int numStoredKeysBefore = currentActiveMap . getNumStoredKeys ( ) ; map = currentActiveMap ; bucket = map . put ( key ) + currentActiveMapIndexOffset ; numStoredKeysCounter . incr ( currentActiveMap . getNumStoredKeys ( ) - numStoredKeysBefore ) ; if ( map . isAtCapacity ( ) ) { addNewMap ( ) ; } return bucket ; }
only a single writer can call this at one time . this method is not thread - safe !
