public DiskCache getDiskCache ( ) { if ( ! mDiskCacheReady ) { if ( DEBUG ) { CLog . d ( LOG_TAG , "%s, try to access disk cache, but it is not open, try to open it." , mDiskCache ) ; } openDiskCacheAsync ( ) ; } synchronized ( mDiskCacheLock ) { while ( mDiskCacheStarting ) { try { if ( DEBUG ) { CLog . d ( LOG_TAG , "%s, try to access, but disk cache is not ready, wait" , mDiskCache ) ; } mDiskCacheLock . wait ( ) ; } catch ( InterruptedException e ) { } } } return mDiskCache ; }
If disk is not read will prepare it first .