Package com.lightbend.cinnamon.stopwatch
Class StopwatchBlocks
- java.lang.Object
-
- com.lightbend.cinnamon.stopwatch.StopwatchBlocks
-
- All Implemented Interfaces:
Stopwatch
- Direct Known Subclasses:
Timekeeper
public abstract class StopwatchBlocks extends java.lang.Object implements Stopwatch
Default implementations of Stopwatchwrapandstart.
-
-
Constructor Summary
Constructors Constructor Description StopwatchBlocks()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidactivate(java.lang.String name)Start a stopwatch where subsequent operations in the current asynchronous scope will propagate the stopwatch; such as within the scope of an Akka Stream operator.abstract voidadd(java.lang.String name)abstract voidremove(java.lang.String name)voidstart(java.lang.String name, java.lang.Runnable runnable)Start a stopwatch where the operations in the runnable will propagate the stopwatch.<T> Tstart(java.lang.String name, scala.Function0<T> body)Start a stopwatch where the operations in the block will propagate the stopwatch.voidwrap(java.lang.String name, java.lang.Runnable runnable)Run the runnable within a stopwatch start and end, to create a user defined time interval.<T> Twrap(java.lang.String name, scala.Function0<T> body)Run the block within a stopwatch start and stop, to create a user defined time interval.
-
-
-
Method Detail
-
activate
public void activate(java.lang.String name)
Description copied from interface:StopwatchStart a stopwatch where subsequent operations in the current asynchronous scope will propagate the stopwatch; such as within the scope of an Akka Stream operator. The matching stopwatch stop operation will create a user defined time interval. A user defined stopwatch may start and stop in any location in the asynchronous flow, i.e. it may span over several actors, futures, or streams.
-
add
public abstract void add(java.lang.String name)
-
remove
public abstract void remove(java.lang.String name)
-
start
public <T> T start(java.lang.String name, scala.Function0<T> body)Description copied from interface:StopwatchStart a stopwatch where the operations in the block will propagate the stopwatch. The matching stopwatch stop operation will create a user defined time interval. A user defined stopwatch may start and stop in any location in the asynchronous flow, i.e. it may span over several actors, futures, or streams.
-
start
public void start(java.lang.String name, java.lang.Runnable runnable)Description copied from interface:StopwatchStart a stopwatch where the operations in the runnable will propagate the stopwatch. The matching stopwatch stop operation will create a user defined time interval. A user defined stopwatch may start and stop in any location in the asynchronous flow, i.e. it may span over several actors, futures, or streams.
-
wrap
public <T> T wrap(java.lang.String name, scala.Function0<T> body)Description copied from interface:StopwatchRun the block within a stopwatch start and stop, to create a user defined time interval.
-
wrap
public void wrap(java.lang.String name, java.lang.Runnable runnable)Description copied from interface:StopwatchRun the runnable within a stopwatch start and end, to create a user defined time interval.
-
-