public void init( RecordManager recMan, SchemaManager schemaManager, AttributeType attributeType ) throws LdapException, IOException { LOG.debug( "Initializing an Index for attribute '{}'", attributeType.getName() ); this.attributeType = attributeType; if ( attributeId == null ) { setAttributeId( attributeType.getName() ); } if ( this.wkDirPath == null ) { NullPointerException e = new NullPointerException( "The index working directory has not be set" ); throw e; } //System.out.println( "IDX Created index " + path ) this.recMan = recMan; try { initTables( schemaManager ); } catch ( IOException e ) { // clean up close( null ); throw e; } initialized = true; }
/** * {@inheritDoc} */ @Override protected final Index createSystemIndex( String oid, URI path, boolean withReverse ) throws LdapException { LOG.debug( "Supplied index {} is not a JdbmIndex. " + "Will create new JdbmIndex using copied configuration parameters." ); JdbmIndex<?> jdbmIndex; if ( oid.equals( ApacheSchemaConstants.APACHE_RDN_AT_OID ) ) { jdbmIndex = new JdbmRdnIndex(); jdbmIndex.setAttributeId( ApacheSchemaConstants.APACHE_RDN_AT_OID ); jdbmIndex.setNumDupLimit( JdbmIndex.DEFAULT_DUPLICATE_LIMIT ); } else if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) ) { jdbmIndex = new JdbmDnIndex( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ); jdbmIndex.setAttributeId( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ); jdbmIndex.setNumDupLimit( JdbmIndex.DEFAULT_DUPLICATE_LIMIT ); } else { jdbmIndex = new JdbmIndex( oid, withReverse ); jdbmIndex.setNumDupLimit( JdbmIndex.DEFAULT_DUPLICATE_LIMIT ); } jdbmIndex.setWkDirPath( path ); return jdbmIndex; }
|| jdbmIndexBean.getIndexAttributeId().equalsIgnoreCase( ApacheSchemaConstants.APACHE_RDN_AT_OID ) ) index = new JdbmRdnIndex();