try{
class_mon.enter();
if ( manager == null ){
String impl = explicit_implementation;
if ( impl == null ){
impl = System.getProperty( "com.aelitis.azureus.core.diskmanager.cache.manager");
}
if ( impl == null ){
impl = DEFAULT_MANAGER;
}
try{
Class impl_class = CacheFileManagerFactory.class.getClassLoader().loadClass( impl );
manager = (CacheFileManager)impl_class.newInstance();
}catch( Throwable e ){
throw( new CacheFileManagerException( null, "Failed to instantiate manager '" + impl + "'", e ));
}
}
return( manager );
}finally{
class_mon.exit();
}