code: public synchronized void registerSerializer(Serializer serializer) {
      Class objClass = getSerializerType(serializer);
      if (!serializers.containsKey(objClass)) {
        int index = COUNTER.getAndIncrement();
        serializers.put(objClass, new SerializerWrapper(index, serializer));
        if (serializersArray.length <= index) {
          serializersArray = Arrays.copyOf(serializersArray, index + 1);
        }
        serializersArray[index] = serializer;
  
        LOGGER.info(String
            .format("Registered new serializer '%s' %n  for '%s' at index %d", serializer.getClass().getName(),
                objClass.getName(), index));
      }
    }
docs: Registers the serializer.
  
  @param serializer serializer