Skip to content

Latest commit

 

History

History
30 lines (14 loc) · 952 Bytes

chapter2_6_1.md

File metadata and controls

30 lines (14 loc) · 952 Bytes

Document Configuration

On the document collection configuration, there are two classes, DocumentConfiguration and DocumentConfigurationAsync to DocumentCollectionManagerFactory and DocumentCollectionManagerAsyncFactory respectively.

DocumentConfiguration configuration = //instance
DocumentConfigurationAsync configurationAsync = //instance
DocumentCollectionManagerFactory managerFactory = configuration.get();
DocumentCollectionManagerAsyncFactory managerAsyncFactory = configurationAsync.getAsync();

If a database has support to both synchronous and asynchronous, it may use UnaryDocumentConfiguration that implement both document configuration.

UnaryDocumentConfiguration unaryDocumentConfiguration = //instance
DocumentCollectionManagerFactory managerFactory = unaryDocumentConfiguration.get();
DocumentCollectionManagerAsyncFactory managerAsyncFactory = unaryDocumentConfiguration.getAsync();