setDocumentMetadataFactory

fun setDocumentMetadataFactory(factory: suspend (documentId: String, data: ByteString?, saveFn: suspend (data: ByteString) -> Unit) -> AbstractDocumentMetadata): DocumentStore.Builder

Sets the factory function for creating AbstractDocumentMetadata instances.

This should only be called if the applications wants to use another AbstractDocumentMetadata implementation than DocumentMetadata. By default this is set to DocumentMetadata.create which creates DocumentMetadata instances.

Return

the builder.

Parameters

factory

the factory to use.