-
public interface FrescoInstrumenter.InstrumenterAllows to capture unit of works across different threads.
-
-
Method Summary
Modifier and Type Method Description abstract ObjectonBeforeSubmitWork(String tag)Called before scheduling a new unit work. abstract ObjectonBeginWork(Object token, String tag)Captures the beginning of the continuation for stolen work. abstract UnitonEndWork(Object token)Captures the end of the continuation for stolen work. abstract UnitmarkFailure(Object token, Throwable th)Reports a failure while executing work. abstract RunnabledecorateRunnable(Runnable runnable, String tag)Called when a unit of work is about to be scheduled. abstract BooleangetIsTracing()Allows to know in advance if the custom instrumenter desires to receive continuation updates. -
-
Method Detail
-
onBeforeSubmitWork
abstract Object onBeforeSubmitWork(String tag)
Called before scheduling a new unit work.
- Parameters:
tag- name.
-
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.
-
-
-
-