CORDA-3542: Use the config values for reconnecting retry interval and max reconnect attempts (#5869)

This commit is contained in:
Ryan Fowler
2020-01-29 13:08:54 +00:00
committed by GitHub
parent 3a34b0d087
commit d16e1126db
8 changed files with 68 additions and 39 deletions

View File

@ -55,6 +55,7 @@ import java.util.zip.Deflater
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
import kotlin.collections.LinkedHashSet
import kotlin.math.roundToLong
import kotlin.reflect.KClass
import kotlin.reflect.full.createInstance
@ -75,6 +76,7 @@ infix fun Temporal.until(endExclusive: Temporal): Duration = Duration.between(th
operator fun Duration.div(divider: Long): Duration = dividedBy(divider)
operator fun Duration.times(multiplicand: Long): Duration = multipliedBy(multiplicand)
operator fun Duration.times(multiplicand: Double): Duration = Duration.ofNanos((toNanos() * multiplicand).roundToLong())
/**
* Returns the single element matching the given [predicate], or `null` if the collection is empty, or throws exception