JdbmPartition schemaPartition = new JdbmPartition();
schemaPartition.setId( "schema" );
schemaPartition.setCacheSize( 1000 );
DbFileListing listing;
try
{
listing = new DbFileListing();
}
catch( IOException e )
{
throw new LdapNamingException( "Got IOException while trying to read DBFileListing: " + e.getMessage(),
ResultCodeEnum.OTHER );
}
Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
for ( String attributeId : listing.getIndexedAttributes() )
{
indexedAttributes.add( new JdbmIndex<Object,ServerEntry>( attributeId ) );
}
schemaPartition.setIndexedAttributes( indexedAttributes );