protected AddressArray createAddressArray(File homeDir,
int length,
int batchSize,
int numSyncBatches,
boolean indexesCached) throws Exception {
AddressArrayFactory factory = new AddressArrayFactory(indexesCached);
AddressArray addrArray = factory.createDynamicAddressArray(homeDir, batchSize, numSyncBatches);
addrArray.expandCapacity(length - 1);
if(length != addrArray.length()) {
_log.warn("array file length " + addrArray.length() + " is different from specified " + length);
}