public void enqueue ( @ Nullable final Callback < T > callback ) { checkIfExecuted ( ) ; this . callback . set ( callback ) ; dispatcher . execute ( new Runnable ( ) { @ Override public void run ( ) { T result ; try { result = perform ( ) ; } catch ( Exception e ) { notifyFailure ( new ApolloException ( "Failed to perform store operation" , e ) ) ; return ; } notifySuccess ( result ) ; } } ) ; }
Schedules operation to be executed in dispatcher