@ Override public IDocumentStore initialize ( ) { if ( initialized ) { return this ; } assertValidConfiguration ( ) ; try { if ( getConventions ( ) . getDocumentIdGenerator ( ) == null ) { // don't overwrite what the user is doing MultiDatabaseHiLoIdGenerator generator = new MultiDatabaseHiLoIdGenerator ( this , getConventions ( ) ) ; _multiDbHiLo = generator ; getConventions ( ) . setDocumentIdGenerator ( generator :: generateDocumentId ) ; } getConventions ( ) . freeze ( ) ; initialized = true ; } catch ( Exception e ) { close ( ) ; throw ExceptionsUtils . unwrapException ( e ) ; } return this ; }
Initializes this instance .