} else {
_cache.remove(id);
}
}
final PropertyMap docProps = coll.getCollectionProperties();
final String dtmClass = docProps.getProperty(IDocumentTable.KEY_DTM_CLASS + docName);
final IDocumentTable table;
if(MemoryMappedDocumentTable.MMDTM_CLASS.equals(dtmClass) || dtmClass == null) {
table = new MemoryMappedDocumentTable(coll, docName, docProps, true);
} else if(DocumentTable.DTM_CLASS.equals(dtmClass)) {
if(USE_MMAP) {
table = new MemoryMappedDocumentTable(coll, docName, docProps, true);
} else {
if(PROFILE_ACCESS_PATTERN != null) {
table = new ProfiledPersistentDocumentTable(PROFILE_ACCESS_PATTERN, coll, docName, docProps);
} else {
table = DocumentTable.load(coll, docName, docProps);
}
}
} else if(BigDocumentTable.DTM_CLASS.equals(dtmClass)) {
table = BigDocumentTable.load(coll, docName, docProps);
} else {
throw new IllegalStateException("dtmp file format '" + dtmClass + "' is illegal: "
+ docProps.getFile().getAbsolutePath());
}
_cache.put(id, table); // intended that two or more DTM table are created concurrently.
return table;
}