{
forwardKeySerializer = ( ElementSerializer<K> ) new ByteArraySerializer( ( Comparator<byte[]> ) comp );
}
else
{
forwardKeySerializer = ( ElementSerializer<K> ) new StringSerializer( ( Comparator<String> ) comp );
}
boolean forwardDups = true;
String oid = attributeType.getOid();
// disable duplicates for entryCSN and entryUUID attribute indices
if ( oid.equals( SchemaConstants.ENTRY_CSN_AT_OID ) || oid.equals( SchemaConstants.ENTRY_UUID_AT_OID ) )
{
forwardDups = false;
}
String forwardTableName = attributeType.getOid() + FORWARD_BTREE;
forward = new MavibotTable<K, String>( recordMan, schemaManager, forwardTableName, forwardKeySerializer,
new StringSerializer(), forwardDups );
/*
* Now the reverse map stores the primary key into the master table as
* the key and the values of attributes as the value. If an attribute
* is single valued according to its specification based on a schema
* then duplicate keys should not be allowed within the reverse table.
*/
if ( withReverse )
{
String reverseTableName = attributeType.getOid() + REVERSE_BTREE;
reverse = new MavibotTable<String, K>( recordMan, schemaManager, reverseTableName, new StringSerializer(),
forwardKeySerializer, !attributeType.isSingleValued() );
}
String path = new File( this.wkDirPath, attributeType.getOid() ).getAbsolutePath();
// finally write a text file in the format <OID>-<attribute-name>.txt