Created
February 23, 2021 14:52
-
-
Save dalexandrov/12735b48c259148ebff2a0a8892cba45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void refreshMetrics(ScheduledExecutorService executor) { | |
Collection<ConnectionPoolMetrics> currentPoolMetrics = driver.metrics().connectionPoolMetrics(); | |
if (!metricsInitialized.get() && currentPoolMetrics.size() >= 1) { | |
lastPoolMetrics.set(currentPoolMetrics); | |
reinit(); | |
if (metricsInitialized.get()) { | |
reinitFuture.get().cancel(false); | |
executor.shutdown(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment