Class ConnectTimings
java.lang.Object
com.couchbase.client.core.io.netty.kv.ConnectTimings
This class gets populated with timings and success/failure of different steps in the
channel bootstrap process and later allows to extract useful information for debugging.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Convenience method to record a single timing right away.static void
Start the connect timings for a given class and channel.stop
(com.couchbase.client.core.deps.io.netty.channel.Channel channel, Class<?> clazz, boolean timeout) Stops the timing.toMap
(com.couchbase.client.core.deps.io.netty.channel.Channel channel) static String
toString
(com.couchbase.client.core.deps.io.netty.channel.Channel channel) Exports the timings into a string.
-
Method Details
-
start
public static void start(com.couchbase.client.core.deps.io.netty.channel.Channel channel, Class<?> clazz) Start the connect timings for a given class and channel.- Parameters:
channel
- the channel to start from.clazz
- the clazz to use as an identifier key.
-
stop
public static Optional<Duration> stop(com.couchbase.client.core.deps.io.netty.channel.Channel channel, Class<?> clazz, boolean timeout) Stops the timing.- Parameters:
channel
- the channel to start from.clazz
- the clazz to use as an identifier key.timeout
- if stopped because of a timeout or not.- Returns:
- the duration.
-
record
public static void record(com.couchbase.client.core.deps.io.netty.channel.Channel channel, Class<?> clazz) Convenience method to record a single timing right away.- Parameters:
channel
- the channel to start from.clazz
- the clazz to use as an identifier key.
-
toString
Exports the timings into a string.- Parameters:
channel
- which channel to export.- Returns:
- the exported string.
-
toMap
-