public <T extends Serializer<?> & Serializable>void registerTypeWithKryoSerializer(Class<?> type, T serializer) {
		if (type == null || serializer == null) {
			throw new NullPointerException("Cannot register null class or serializer.");
		}

		registeredTypesWithKryoSerializers.put(type, new SerializableSerializer<>(serializer));
	}
public < T extends Serializer < ? > & Serializable > void registerTypeWithKryoSerializer ( Class < ? > type , T serializer ) { if ( type == null || serializer == null ) { throw new NullPointerException ( "Cannot register null class or serializer." ) ; } registeredTypesWithKryoSerializers . put ( type , new SerializableSerializer < > ( serializer ) ) ; }
Registers the given type with a Kryo Serializer.

Note that the serializer instance must be serializable (as defined by java.io.Serializable),
because it may be distributed to the worker nodes by java serialization.

@param type The class of the types serialized with the given serializer.
@param serializer The serializer to use.