code: public boolean registerCollection(CollectionSchema.MessageFactory factory)
      {
          return null == collectionMapping.putIfAbsent(factory.typeClass()
                  .getName(), factory);
      }
docs: Registers a collection. Returns true if registration is successful.