Package oracle.jdbc.diagnostics

## Class MetricsImpl

- java.lang.Object
- - oracle.jdbc.diagnostics.Metrics
  - - oracle.jdbc.diagnostics.MetricsImpl

    public class MetricsImpl
    extends Metrics

Metrics collected by the JDBC driver.

### Nested Class Summary

### Nested classes/interfaces inherited from class oracle.jdbc.diagnostics.Metrics

`Metrics.ConnectionEvent`

### Constructor Summary

Constructors
`MetricsImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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 oracle.jdbc.diagnostics.Metrics

`add, clear, enable, getReport, print`

### 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)

Overrides:
  `end` in class `Metrics`

#### 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` -