Package dagger.producers.monitoring
Class TimingRecorders
- java.lang.Object
-
- dagger.producers.monitoring.TimingRecorders
-
@Beta public final class TimingRecorders extends java.lang.Object
Utility methods relating to timing.- Since:
- 2.1
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ProductionComponentTimingRecorder.Factory
delegatingProductionComponentTimingRecorderFactory(java.util.Collection<ProductionComponentTimingRecorder.Factory> factories)
Returns a timing recorder factory that delegates to the given factories, and ensures that any method called on this object, even transitively, does not throw aRuntimeException
or return null.static ProductionComponentTimingRecorder
noOpProductionComponentTimingRecorder()
Returns a component recorder that returns no-op producer recorders.static ProductionComponentTimingRecorder.Factory
noOpProductionComponentTimingRecorderFactory()
Returns a recorder factory that returns no-op component recorders.
-
-
-
Method Detail
-
delegatingProductionComponentTimingRecorderFactory
public static ProductionComponentTimingRecorder.Factory delegatingProductionComponentTimingRecorderFactory(java.util.Collection<ProductionComponentTimingRecorder.Factory> factories)
Returns a timing recorder factory that delegates to the given factories, and ensures that any method called on this object, even transitively, does not throw aRuntimeException
or return null.If the delegate recorders throw an
Error
, then that will escape this recorder implementation. Errors are treated as unrecoverable conditions, and may cause the entire component's execution to fail.
-
noOpProductionComponentTimingRecorderFactory
public static ProductionComponentTimingRecorder.Factory noOpProductionComponentTimingRecorderFactory()
Returns a recorder factory that returns no-op component recorders.
-
noOpProductionComponentTimingRecorder
public static ProductionComponentTimingRecorder noOpProductionComponentTimingRecorder()
Returns a component recorder that returns no-op producer recorders.
-
-