public final int invoke ( @ NonNull final ChronosOperation < ? > operation , @ NonNull final String tag , final boolean broadcastResult ) { logd ( "invoking tagged operation, tag=" + tag ) ; final Integer savedId = mTaggedRequests . get ( tag ) ; if ( savedId != null && isRunning ( savedId ) ) { logd ( "operation with tag=" + tag + " is running, do nothing" ) ; return savedId ; } logd ( "operation with tag=" + tag + " is not running, start it" ) ; final int id = ChronosService . getInstance ( ) . runAsync ( operation , broadcastResult ) ; mTaggedRequests . put ( tag , id ) ; return id ; }
Launches an operation in background thread . If operation launched with the same tag from the same ServiceConnector is running new operation launch will not be triggered .