@ Nullable private DataType loadData ( @ NonNull final Task < DataType , KeyType , ViewType , ParamType > task ) { try { DataType data = doInBackground ( task . key , task . params ) ; if ( data != null ) { cacheData ( task . key , data ) ; } logger . logInfo ( getClass ( ) , "Loaded data with key " + task . key ) ; return data ; } catch ( Exception e ) { logger . logError ( getClass ( ) , "An error occurred while loading data with key " + task . key , e ) ; return null ; } }
Executes a specific task in order to load data .