Package 

Interface FrescoInstrumenter.Instrumenter

    • Method Summary

      Modifier and Type Method Description
      abstract Object onBeforeSubmitWork(String tag) Called before scheduling a new unit work.
      abstract Object onBeginWork(Object token, String tag) Captures the beginning of the continuation for stolen work.
      abstract Unit onEndWork(Object token) Captures the end of the continuation for stolen work.
      abstract Unit markFailure(Object token, Throwable th) Reports a failure while executing work.
      abstract Runnable decorateRunnable(Runnable runnable, String tag) Called when a unit of work is about to be scheduled.
      abstract Boolean getIsTracing() Allows to know in advance if the custom instrumenter desires to receive continuation updates.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onBeginWork

         abstract Object onBeginWork(Object token, String tag)

        Captures the beginning of the continuation for stolen work.

        Parameters:
        token - returned by Instrumenter#onBeforeSubmitWork.
        tag - optional name.
      • onEndWork

         abstract Unit onEndWork(Object token)

        Captures the end of the continuation for stolen work.

        Parameters:
        token - returned by Instrumenter#onBeginWork.
      • markFailure

         abstract Unit markFailure(Object token, Throwable th)

        Reports a failure while executing work.

        <note>Instrumenter#onEndWork(Object) still needs to be invoked.

        Parameters:
        token - returned by Instrumenter#onBeginWork(Object, String).
        th - containing the failure.
      • decorateRunnable

         abstract Runnable decorateRunnable(Runnable runnable, String tag)

        Called when a unit of work is about to be scheduled.

        Parameters:
        runnable - that will be executed.
        tag - name.
      • getIsTracing

         abstract Boolean getIsTracing()

        Allows to know in advance if the custom instrumenter desires to receive continuation updates. This can be used to avoid un-necessary work if the subscriber will not use the information provided.