Class MetricsImpl


  • public class MetricsImpl
    extends Metrics
    Metrics collected by the JDBC driver.
    • Constructor Summary

      Constructors 
      Constructor Description
      MetricsImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void begin​(Metrics.ConnectionEvent event)
      All begin and end calls are noop in this class because this class is instantiated when metrics capturing is disabled.
      void begin​(Metrics.ConnectionEvent event, int retryIdentifier)
      Driver retries some events like 'Generate PK', 'SSL Renegotiation Receive', 'SSL Renegotiation RunTasks'.
      void close()
      The map events and metrics is added to the collection.
      void end​(Metrics.ConnectionEvent event)  
      void end​(Metrics.ConnectionEvent event, int retryIdentifier)
      Driver retries some events like 'Generate PK', 'SSL Renegotiation Receive', 'SSL Renegotiation RunTasks'.
      • Methods inherited from class java.lang.Object

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

      • MetricsImpl

        public MetricsImpl()
    • Method Detail

      • begin

        public void begin​(Metrics.ConnectionEvent event)
        Description copied from class: Metrics
        All begin and end calls are noop in this class because this class is instantiated when metrics capturing is disabled. The subclass of this is instantiated when metrics capturing is enabled. This is to avoid 'is capturing metrics enabled' checks in begin and end methods.
        Overrides:
        begin in class Metrics
      • begin

        public void begin​(Metrics.ConnectionEvent event,
                          int retryIdentifier)
        Driver retries some events like 'Generate PK', 'SSL Renegotiation Receive', 'SSL Renegotiation RunTasks'. The begin and end calls put those retried events in the consolidated metric map with key as event name suffixed by retry identifier. E.g. 'Generate PK 1', 'SSL Renegotiation Receive 1'. For the cases where there is no retry, there won't be any suffix .
        Overrides:
        begin in class Metrics
        Parameters:
        event -
        retryIdentifier -
      • end

        public void end​(Metrics.ConnectionEvent event,
                        int retryIdentifier)
        Driver retries some events like 'Generate PK', 'SSL Renegotiation Receive', 'SSL Renegotiation RunTasks'. The begin and end calls put those retried events in the consolidated metric map with key as event name suffixed by retry identifier. E.g. 'Generate PK 1', 'SSL Renegotiation Receive 1'. For the cases where there is no retry, there won't be any suffix .
        Overrides:
        end in class Metrics
        Parameters:
        event -
        retryIdentifier -
      • close

        public void close()
        The map events and metrics is added to the collection.
        Overrides:
        close in class Metrics
        Parameters:
        connectionMetricsMap -